Skip to content

Move documentation integrity into Rust xtask - #61

Merged
flyingrobots merged 113 commits into
mainfrom
maintenance/documentation-xtask
Jul 29, 2026
Merged

Move documentation integrity into Rust xtask#61
flyingrobots merged 113 commits into
mainfrom
maintenance/documentation-xtask

Conversation

@flyingrobots

Copy link
Copy Markdown
Owner

Closes #47.

Problem

Documentation and workflow verification was split between Rust and seven Python programs, so cargo xtask verify did not own the complete repository integrity boundary.

Invariant affected

Repository verification must select deterministic source corpora, admit exact tools and dependency graphs, bound external work, preserve precise refusals, and contain no Python scripts.

Approach

Move corpus selection, Dependabot coverage, Node lock and installer admission, contributor command laws, tool execution, Markdown links, and workflow linting behind cargo xtask documentation-integrity-check. Route cargo xtask verify and CI through that command, share bounded Git/file/process adapters, and remove the superseded Python files.

Alternatives rejected

Retaining parallel Python orchestration preserves divergent coverage. Reimplementing Markdown, anchor, or workflow parsers in Keep would expand the parser surface; exact-version external tools remain the admitted boundary.

Failure modes

Typed refusals cover malformed or duplicate JSON, unsafe/non-UTF-8/nonregular paths, changed repository roots, empty corpora, dependency or installer drift, unavailable or wrong-version tools, bounded-output violations, process deadlines, simultaneous checker failures, broken fragments, and invalid workflows.

Tests added

Rust laws cover the former positive and negative Python cases plus stronger duplicate-field, installer-spoof, simultaneous-failure, and descendant-held-pipe regressions. The full debug and release workspace suites, doctests, all/minimal Clippy, Rust 1.96, fuzz checks, root/fuzz dependency policy and audits, pinned-tool verification, external malformed-input tests, and whole-tree whitespace check pass locally.

Benchmark impact

No production storage path changes. No benchmark impact is expected or measured.

Format and API compatibility

No content identity, durable format, or public keep API changes. The new dependencies are optional, exactly pinned, and confined to the private xtask repository-task feature.

Recovery implications

The checks are read-only. They do not publish or repair repository state, so interruption leaves no authoritative state requiring recovery.

Security implications

The boundary disables tool network access during validation, refuses duplicate JSON fields and unlocked installer substitutions, bounds captured output and execution time, and preserves exact dependency/tool admission.

Checklist

  • I read AGENTS.md and the Keep Rust Engineering Standard.
  • No new governed durable-format or storage decision requires an ADR.
  • I added tests appropriate to the actual failure modes.
  • I ran the relevant formatting, linting, testing, and policy checks.
  • I did not mix unrelated production refactoring with the semantic change.

@flyingrobots

Copy link
Copy Markdown
Owner Author

Code Lawyer activity summary

# Priority Source File Resolution Commit
1 P1 Self xtask/src/documentation_integrity/node_toolchain.rs Admit the exact direct Markdownlint manifest coordinate. 5139ddb
2 P1 Self xtask/src/documentation_integrity/node_toolchain/unique_json.rs Reject duplicate JSON object members recursively. e991908
3 P2 Self xtask/src/documentation_integrity/execution.rs Retain simultaneous Markdownlint and Lychee refusals. a3f3c09
4 P2 Self xtask/src/documentation_integrity/contributor_contract.rs Port the staged and unstaged whitespace command laws. 0d5895d
5 P1 Self xtask/src/bounded_process.rs Apply one deadline to the child and output collectors. dcc2e45
6 P1 Self xtask/src/documentation_integrity/node_toolchain.rs Refuse comment-spoofed or unlocked npm installation. db31c83
7 P3 Self documentation corpus Name the dependency authority and coupled admission record precisely. 146c419

All seven findings were resolved through isolated RED → GREEN cycles. The complete local debug/release, formatting, Clippy, MSRV, fuzz, dependency-policy, audit, pinned documentation-tool, external refusal, and whitespace matrix is green. No public Keep API or durable-format surface changed.

@codex review please. Confirm the issue-#47 parity and bounded-execution claims, with particular attention to fail-closed parsing and process cleanup.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@flyingrobots, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c12e79f4-8519-4405-901c-4a380609987b

📥 Commits

Reviewing files that changed from the base of the PR and between 5e8a962 and 1254cdc.

📒 Files selected for processing (28)
  • CHANGELOG.md
  • xtask/src/documentation_integrity.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/documentation_integrity/corpus/replacement_tests.rs
  • xtask/src/documentation_integrity/corpus/source_witness.rs
  • xtask/src/documentation_integrity/corpus/tests.rs
  • xtask/src/documentation_integrity/dependabot.rs
  • xtask/src/documentation_integrity/dependabot/tests.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/execution/finish_tests.rs
  • xtask/src/documentation_integrity/execution/snapshot.rs
  • xtask/src/documentation_integrity/execution/snapshot/namespace.rs
  • xtask/src/documentation_integrity/execution/snapshot/tests.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/src/documentation_integrity/node_toolchain/tests/lock_graph.rs
  • xtask/src/documentation_integrity/policy_corpus.rs
  • xtask/src/documentation_integrity/tests.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/fuzz_campaign/workflow_tests.rs
  • xtask/src/main.rs
  • xtask/src/repository_file.rs
  • xtask/src/repository_file/exact_copy.rs
  • xtask/src/repository_fixture.rs
  • xtask/src/source_structure.rs
  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/tests/source_policy_contract.rs

Walkthrough

The change moves documentation and workflow integrity checks from Python into Rust cargo xtask, adds bounded repository/process validation, strengthens source admission and fuzz deadlines, introduces descriptor-bound child working directories, and wires the new checks into CI and cargo xtask verify.

Changes

Repository integrity migration

Layer / File(s) Summary
Bounded processes and repository authority
xtask/src/bounded_process/*, xtask/src/repository_file.rs, repository-process-spawn/*
Adds deadline-bound process capture, output limits, process-group cleanup, terminal-signal handling, descriptor-bound child directories, and repository/file identity checks.
Git inventory and source admission
xtask/src/git_inventory/*, xtask/src/source_structure/*
Adds deterministic Git path inventory, typed inventory errors, Python shebang detection, source classification, no-follow file admission, and replacement/refusal tests.
Documentation and workflow integrity
xtask/src/documentation_integrity/*, xtask/src/main.rs, xtask/src/task_error.rs
Adds Rust validators for documentation corpora, dependency manifests, Node lock artifacts, Dependabot coverage, workflow structure, tool versions, and malformed-input refusal scenarios.
Integration, fuzzing, and policy
.github/workflows/ci.yml, xtask/Cargo.toml, xtask/src/fuzz_campaign/*, fuzz/*, Cargo.toml, .github/dependabot.yml
Routes CI and verification through cargo xtask, adds fuzz JSON admission and process deadlines, registers the new workspace crate, and updates dependency features and policies.
Documentation and retired checkers
CONTRIBUTING.md, docs/*, CHANGELOG.md, scripts/*
Documents the Rust-owned boundary and removes the superseded Python documentation/workflow checkers and tests.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

Poem

Rust guards the docs,
Git paths march in ordered rows,
Signals fall silent.
Fuzzers test the boundary—
One xtask rules them all.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 72.35% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Concise and specific; it matches the main shift to Rust-owned documentation integrity checks.
Description check ✅ Passed All required template sections are present and substantively filled, including problem, approach, tests, risks, and checklist.
Linked Issues check ✅ Passed The Rust xtask command, verify/CI wiring, corpus semantics, refusal cases, version admission, tests, and Python removal align with #47.
Out of Scope Changes check ✅ Passed No clearly unrelated changes stand out; the extra refactors support the same bounded integrity and process boundary.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 146c419826

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread xtask/src/documentation_integrity/node_toolchain.rs Outdated
Comment thread xtask/src/bounded_process.rs Outdated
Comment thread xtask/src/source_structure/source_kind.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
xtask/src/git_inventory/process.rs (1)

54-81: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Cleanup/join failures mask the primary detected error instead of preserving it.

Three sites in start_git (54-59, 61-66, 71-80) run cleanup_child(&mut child, operation)?; before return Err(<the actual Pipe/Run error>) — if cleanup_child itself fails, the ? discards the intended error entirely. Same pattern in collect_git_result: diagnostic_worker.join()...? and stop? both run ahead of paths?/status?, so a cleanup/join failure during an already-failed paths read (the "simultaneous failures" case) silently replaces the real root cause with a cleanup-failure message.

bounded_process.rs::cleanup in this same PR already solves this correctly by boxing the primary error (ProcessError::Cleanup { primary: Box::new(primary), .. }). GitInventoryError should gain an equivalent variant so this module doesn't regress diagnostic precision relative to its sibling.

🔧 Proposed fix sketch (mirrors bounded_process.rs::cleanup)
+    Cleanup {
+        primary: Box<Self>,
+        action: &'static str,
+        source: io::Error,
+    },
-fn cleanup_child(child: &mut Child, operation: &'static str) -> Result<(), GitInventoryError> {
-    let stop = request_stop(child, operation);
-    let wait = child.wait().map_err(|source| GitInventoryError::Run {
-        operation,
-        action: "wait for",
-        source,
-    });
-    stop?;
-    wait.map(|_| ())
-}
+fn cleanup_child(
+    child: &mut Child,
+    operation: &'static str,
+    primary: GitInventoryError,
+) -> GitInventoryError {
+    if let Err(source) = request_stop(child, operation) {
+        return GitInventoryError::Cleanup { primary: Box::new(primary), action: "stop", source };
+    }
+    if let Err(source) = child.wait() {
+        return GitInventoryError::Cleanup { primary: Box::new(primary), action: "wait for", source };
+    }
+    primary
+}

Also applies to: 89-116

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@xtask/src/git_inventory/process.rs` around lines 54 - 81, Preserve the
primary git error when cleanup or diagnostic-reader joining also fails. Add a
cleanup-wrapping variant to GitInventoryError, mirroring ProcessError::Cleanup,
and update start_git’s stdout/stderr pipe and diagnostic-worker failure paths to
return the original Pipe/Run error while recording cleanup failure. In
collect_git_result, ensure paths/status read errors remain primary when
diagnostic_worker.join or stop fails, wrapping the cleanup failure instead of
replacing the detected error.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@xtask/src/bounded_process.rs`:
- Around line 44-91: Refactor capture by extracting child spawning and
stdout/stderr pipe acquisition into a small spawn_piped helper, preserving the
existing ProcessError mappings and cleanup behavior. Update capture to call this
helper so its remaining reader setup, waiting, collection, and result
construction stay within the review guideline; do not change wait_for_child
behavior.
- Around line 20-91: add rustdoc for every listed public boundary symbol: in
xtask/src/bounded_process.rs lines 20-91 document ProcessOutput, status, and
capture, including blocking behavior, deadline semantics, and error taxonomy; in
xtask/src/bounded_process/error.rs lines 8-36 document ProcessError and each
variant’s trigger; in xtask/src/git_inventory/error.rs lines 11-49 document
GitOutputUnit, GitInventoryError, and each variant’s trigger; in
xtask/src/git_inventory/path_stream.rs lines 21-26 document read_paths framing
and limits, and lines 66-77 document GitPath, GitPath::new, and
GitPath::as_bytes; in xtask/src/git_inventory/process.rs lines 28-32 document
paths, including blocking, bounded-output, and error semantics.

In `@xtask/src/bounded_process/reader.rs`:
- Around line 51-59: Redesign the timeout path in the reader flow around
deadline.remaining, recv_timeout, and handle.join so a timeout cannot return
while the reader thread remains blocked. Ensure cleanup closes or otherwise
invalidates the pipe and causes descendants retaining inherited handles to
release it, then always join and reap the reader thread before propagating the
timeout error; preserve normal receive and panic handling.

In `@xtask/src/bounded_process/tests.rs`:
- Around line 47-49: Remove the direct stdout fixture write in the affected
test, including the StdoutLock, write_all, and flush calls; alternatively, add
the required documented test exception if the output is essential. Keep the
test’s existing behavior otherwise unchanged.

In `@xtask/src/documentation_integrity/dependabot.rs`:
- Around line 83-111: Fix directories parsing in block_scopes so it stops
before, rather than consumes, the first line that does not match the
directory-item prefix; avoid map_while on the shared iterator and preserve that
rejected line for the outer loop to inspect. Add a regression test covering a
comment or blank line followed by another directory declaration, ensuring all
scopes are extracted.

In `@xtask/src/documentation_integrity/error/display.rs`:
- Around line 22-111: Reduce DocumentationError::fmt below the logical-line cap
by extracting the repository-file variants into a dedicated dispatch helper and
the Tool* variants into another helper, mirroring source_path and
repository_root. Move only the corresponding match-arm formatting and dispatch
from fmt, preserving all existing messages and behavior.

In `@xtask/src/documentation_integrity/node_toolchain.rs`:
- Around line 145-156: Update require_provenance to validate the complete
accepted package graph rather than only checking resolved and integrity
presence. Compare packages deterministically against the trusted expected graph,
requiring exact package paths, versions, resolved URLs, and integrity values,
and reject missing or extra entries including altered lock artifacts.

In `@xtask/src/documentation_integrity/workflow_contract.rs`:
- Around line 17-31: Replace raw substring checks in admit with parsed YAML
documentation-job steps and validate only actual run fields, rejecting comments,
quoted decoys, and every Python execution form; update
xtask/src/documentation_integrity/workflow_contract.rs lines 17-31. In
xtask/src/documentation_integrity/node_toolchain.rs lines 95-114, normalize
shell commands to ignore heredoc/comment text and whitespace or continuation
variants, require the real npm ci invocation, and reject actual npm install
invocations. In xtask/src/documentation_integrity/workflow_contract/tests.rs
lines 18-35, add a fixture containing commented required commands without
executable equivalents and assert admission is refused.

In `@xtask/src/fuzz_campaign/execution.rs`:
- Around line 37-45: Update the OutputMode::Inherit branch in the
plan.output_mode() match to use a deadline-aware inherited-status helper instead
of bounded_process::status, passing plan.deadline(). Ensure the helper
terminates and reaps the child when the deadline expires while preserving
inherited output and existing status/error behavior.

In `@xtask/src/git_inventory/path_stream.rs`:
- Around line 131-170: Separate the empty-path error in admit_path from the
unterminated-output error in finish: add or use a dedicated GitInventoryError
variant such as EmptyPath for current.is_empty(), while retaining OutputFraming
for trailing bytes. Update the corresponding error display in
git_inventory/error.rs so each variant accurately describes its malformed-input
shape.

In `@xtask/src/source_structure.rs`:
- Line 28: After the source scan completes and `source_violations` is produced,
call `verify_source_root(&source_root, repository_root)?` before returning or
continuing with the result. Anchor this revalidation in the command flow using
`RepositoryRoot::open` and `source_violations`, matching the existing pattern in
`documentation_integrity::check`.

---

Outside diff comments:
In `@xtask/src/git_inventory/process.rs`:
- Around line 54-81: Preserve the primary git error when cleanup or
diagnostic-reader joining also fails. Add a cleanup-wrapping variant to
GitInventoryError, mirroring ProcessError::Cleanup, and update start_git’s
stdout/stderr pipe and diagnostic-worker failure paths to return the original
Pipe/Run error while recording cleanup failure. In collect_git_result, ensure
paths/status read errors remain primary when diagnostic_worker.join or stop
fails, wrapping the cleanup failure instead of replacing the detected error.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1e2477d2-5bf2-462a-923f-d5a095be5648

📥 Commits

Reviewing files that changed from the base of the PR and between 30cfd1f and 146c419.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (66)
  • .github/workflows/ci.yml
  • .gitignore
  • CHANGELOG.md
  • CONTRIBUTING.md
  • docs/Documentation Standards.md
  • docs/dependencies/documentation-toolchain.md
  • docs/dependencies/serde-and-serde-json-1.0.229-1.0.151.md
  • scripts/check_markdown.py
  • scripts/check_workflows.py
  • scripts/test_check_markdown.py
  • scripts/test_dependabot_coverage.py
  • scripts/test_documentation_integrity.py
  • scripts/test_documentation_refusals.py
  • scripts/test_workflow_corpus.py
  • xtask/Cargo.toml
  • xtask/src/bounded_process.rs
  • xtask/src/bounded_process/deadline.rs
  • xtask/src/bounded_process/error.rs
  • xtask/src/bounded_process/reader.rs
  • xtask/src/bounded_process/tests.rs
  • xtask/src/documentation_integrity.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/documentation_integrity/corpus/tests.rs
  • xtask/src/documentation_integrity/dependabot.rs
  • xtask/src/documentation_integrity/dependabot/manifest.rs
  • xtask/src/documentation_integrity/dependabot/tests.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/execution/external_tests.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/src/documentation_integrity/node_toolchain/tests.rs
  • xtask/src/documentation_integrity/node_toolchain/unique_json.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/tool.rs
  • xtask/src/documentation_integrity/tool/tests.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/fuzz_campaign.rs
  • xtask/src/fuzz_campaign/execution.rs
  • xtask/src/fuzz_campaign/execution/error.rs
  • xtask/src/fuzz_campaign/execution/tests.rs
  • xtask/src/fuzz_campaign/process/error.rs
  • xtask/src/fuzz_campaign/target.rs
  • xtask/src/fuzz_campaign/target/error.rs
  • xtask/src/git_inventory.rs
  • xtask/src/git_inventory/error.rs
  • xtask/src/git_inventory/path_stream.rs
  • xtask/src/git_inventory/path_stream/tests.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/main.rs
  • xtask/src/repository_file.rs
  • xtask/src/source_structure.rs
  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/source_structure/source_kind.rs
  • xtask/src/source_structure/tests.rs
  • xtask/src/task_error.rs
  • xtask/tests/cli_contract.rs
  • xtask/tests/cli_contract/documentation_tools.rs
  • xtask/tests/documentation_cli_contract.rs
  • xtask/tests/source_policy_contract.rs
💤 Files with no reviewable changes (9)
  • scripts/test_check_markdown.py
  • xtask/src/fuzz_campaign.rs
  • xtask/src/fuzz_campaign/process/error.rs
  • scripts/test_documentation_refusals.py
  • scripts/test_workflow_corpus.py
  • scripts/test_documentation_integrity.py
  • scripts/check_markdown.py
  • scripts/check_workflows.py
  • scripts/test_dependabot_coverage.py
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Runtime fuzz smoke
  • GitHub Check: Rust quality gates
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{rs,toml}

📄 CodeRabbit inference engine (AGENTS.md)

Use stable, pinned Rust with edition 2024; cargo fmt --check and Clippy with -D warnings must pass.

Files:

  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/tests/documentation_cli_contract.rs
  • xtask/src/git_inventory.rs
  • xtask/src/fuzz_campaign/execution/error.rs
  • xtask/src/documentation_integrity/tool/tests.rs
  • xtask/src/documentation_integrity/execution/external_tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity.rs
  • xtask/src/bounded_process/deadline.rs
  • xtask/src/source_structure/source_kind.rs
  • xtask/src/documentation_integrity/tool.rs
  • xtask/Cargo.toml
  • xtask/src/fuzz_campaign/target.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/bounded_process/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/tests/cli_contract/documentation_tools.rs
  • xtask/src/fuzz_campaign/target/error.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/corpus/tests.rs
  • xtask/src/git_inventory/error.rs
  • xtask/tests/source_policy_contract.rs
  • xtask/src/documentation_integrity/dependabot.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/bounded_process/error.rs
  • xtask/src/documentation_integrity/dependabot/tests.rs
  • xtask/src/documentation_integrity/dependabot/manifest.rs
  • xtask/src/fuzz_campaign/execution.rs
  • xtask/src/bounded_process/reader.rs
  • xtask/src/documentation_integrity/node_toolchain/tests.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/task_error.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/main.rs
  • xtask/src/documentation_integrity/node_toolchain/unique_json.rs
  • xtask/src/fuzz_campaign/execution/tests.rs
  • xtask/tests/cli_contract.rs
  • xtask/src/repository_file.rs
  • xtask/src/git_inventory/path_stream.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process.rs
  • xtask/src/source_structure.rs
  • xtask/src/git_inventory/path_stream/tests.rs
  • xtask/src/source_structure/tests.rs
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Do not use unwrap, expect, panic!, todo!, unimplemented!, dbg!, stdout/stderr printing, unchecked indexing, lossy casts, or unsafe code. Unsafe requires a dedicated crate with documented invariants, tests, and measured necessity.
Use checked arithmetic for externally influenced values and TryFrom/try_from instead of potentially lossy as conversions.
Public functions must not take boolean parameters; use enums instead. Prefer typed newtypes for IDs, lengths, offsets, generations, and namespaces.
Parse and validate untrusted bytes before admitting them as trusted types; make illegal states unrepresentable where practical.
Prefer concrete types, synchronous core APIs, and traits only at real substitution boundaries; do not introduce async without demonstrated consumer need.
Do not let HashMap iteration order affect identity, serialization, tests, or behavior.
Use hexagonal architecture: domain and port modules own invariants and semantic capabilities, dependencies point inward, and core/ports must not import adapters, filesystems, networks, CLIs, runtimes, or application policy.
Keep codecs at ingress and egress boundaries. Ports exchange semantic or validated types, not serializer-owned JSON, CBOR, or wire values.
Keep files near 200 lines, review files over 300, and do not exceed 500; keep functions near 20 logical lines, review over 40, do not exceed 60; limit nesting to 3 and parameters to 5.
Do not create generic utils.rs, helpers.rs, common.rs, misc.rs, shared.rs, manager.rs, service.rs, types.rs, or models.rs; name files after the concept they own.
Keep items private by default; use pub(crate) unless external consumers require public visibility. Public validated types must have private fields and checked constructors, and consequential staged work, plans, commits, and results should use #[must_use].
Use Option for normal absence, typed errors by boundary, preserved error sources, and expected/observed state in...

Files:

  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/tests/documentation_cli_contract.rs
  • xtask/src/git_inventory.rs
  • xtask/src/fuzz_campaign/execution/error.rs
  • xtask/src/documentation_integrity/tool/tests.rs
  • xtask/src/documentation_integrity/execution/external_tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity.rs
  • xtask/src/bounded_process/deadline.rs
  • xtask/src/source_structure/source_kind.rs
  • xtask/src/documentation_integrity/tool.rs
  • xtask/src/fuzz_campaign/target.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/bounded_process/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/tests/cli_contract/documentation_tools.rs
  • xtask/src/fuzz_campaign/target/error.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/corpus/tests.rs
  • xtask/src/git_inventory/error.rs
  • xtask/tests/source_policy_contract.rs
  • xtask/src/documentation_integrity/dependabot.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/bounded_process/error.rs
  • xtask/src/documentation_integrity/dependabot/tests.rs
  • xtask/src/documentation_integrity/dependabot/manifest.rs
  • xtask/src/fuzz_campaign/execution.rs
  • xtask/src/bounded_process/reader.rs
  • xtask/src/documentation_integrity/node_toolchain/tests.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/task_error.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/main.rs
  • xtask/src/documentation_integrity/node_toolchain/unique_json.rs
  • xtask/src/fuzz_campaign/execution/tests.rs
  • xtask/tests/cli_contract.rs
  • xtask/src/repository_file.rs
  • xtask/src/git_inventory/path_stream.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process.rs
  • xtask/src/source_structure.rs
  • xtask/src/git_inventory/path_stream/tests.rs
  • xtask/src/source_structure/tests.rs
**/*.{rs,json,cbor}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,json,cbor}: Identity, persistence, comparison, tests, and protocol behavior must be deterministic and independent of iteration order, host state, clocks, locale, and serializer defaults.
Boundary JSON and CBOR must use a named canonical profile with golden fixtures; reject duplicate fields and noncanonical identity-bearing encodings. Hash only typed, domain-separated canonical bytes.

Files:

  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/tests/documentation_cli_contract.rs
  • xtask/src/git_inventory.rs
  • xtask/src/fuzz_campaign/execution/error.rs
  • xtask/src/documentation_integrity/tool/tests.rs
  • xtask/src/documentation_integrity/execution/external_tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity.rs
  • xtask/src/bounded_process/deadline.rs
  • xtask/src/source_structure/source_kind.rs
  • xtask/src/documentation_integrity/tool.rs
  • xtask/src/fuzz_campaign/target.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/bounded_process/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/tests/cli_contract/documentation_tools.rs
  • xtask/src/fuzz_campaign/target/error.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/corpus/tests.rs
  • xtask/src/git_inventory/error.rs
  • xtask/tests/source_policy_contract.rs
  • xtask/src/documentation_integrity/dependabot.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/bounded_process/error.rs
  • xtask/src/documentation_integrity/dependabot/tests.rs
  • xtask/src/documentation_integrity/dependabot/manifest.rs
  • xtask/src/fuzz_campaign/execution.rs
  • xtask/src/bounded_process/reader.rs
  • xtask/src/documentation_integrity/node_toolchain/tests.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/task_error.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/main.rs
  • xtask/src/documentation_integrity/node_toolchain/unique_json.rs
  • xtask/src/fuzz_campaign/execution/tests.rs
  • xtask/tests/cli_contract.rs
  • xtask/src/repository_file.rs
  • xtask/src/git_inventory/path_stream.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process.rs
  • xtask/src/source_structure.rs
  • xtask/src/git_inventory/path_stream/tests.rs
  • xtask/src/source_structure/tests.rs
**/*.{rs,bin}

📄 CodeRabbit inference engine (AGENTS.md)

Durable formats must define magic bytes, versioning, canonical encoding, explicit endianness, bounds, checksums, and golden fixtures; reject trailing bytes, duplicate fields, noncanonical encodings, overflow, invalid ordering, excessive depth, and unknown mandatory flags. Do not use arbitrary Serde or Rust struct output as a durable format.

Files:

  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/tests/documentation_cli_contract.rs
  • xtask/src/git_inventory.rs
  • xtask/src/fuzz_campaign/execution/error.rs
  • xtask/src/documentation_integrity/tool/tests.rs
  • xtask/src/documentation_integrity/execution/external_tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity.rs
  • xtask/src/bounded_process/deadline.rs
  • xtask/src/source_structure/source_kind.rs
  • xtask/src/documentation_integrity/tool.rs
  • xtask/src/fuzz_campaign/target.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/bounded_process/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/tests/cli_contract/documentation_tools.rs
  • xtask/src/fuzz_campaign/target/error.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/corpus/tests.rs
  • xtask/src/git_inventory/error.rs
  • xtask/tests/source_policy_contract.rs
  • xtask/src/documentation_integrity/dependabot.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/bounded_process/error.rs
  • xtask/src/documentation_integrity/dependabot/tests.rs
  • xtask/src/documentation_integrity/dependabot/manifest.rs
  • xtask/src/fuzz_campaign/execution.rs
  • xtask/src/bounded_process/reader.rs
  • xtask/src/documentation_integrity/node_toolchain/tests.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/task_error.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/main.rs
  • xtask/src/documentation_integrity/node_toolchain/unique_json.rs
  • xtask/src/fuzz_campaign/execution/tests.rs
  • xtask/tests/cli_contract.rs
  • xtask/src/repository_file.rs
  • xtask/src/git_inventory/path_stream.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process.rs
  • xtask/src/source_structure.rs
  • xtask/src/git_inventory/path_stream/tests.rs
  • xtask/src/source_structure/tests.rs
🧠 Learnings (1)
📚 Learning: 2026-07-27T22:37:16.896Z
Learnt from: flyingrobots
Repo: flyingrobots/keep PR: 49
File: src/layout/record_length.rs:29-29
Timestamp: 2026-07-27T22:37:16.896Z
Learning: This repository targets Rust 1.96 (per `Cargo.toml` `rust-version` and `rust-toolchain.toml`). When writing or reviewing Rust code, only use APIs/language features stabilized in Rust 1.96 or earlier. Avoid using newer std/library APIs that wouldn’t be available on Rust 1.96 (e.g., you may rely on `u64::is_multiple_of` since it’s stabilized by 1.96).

Applied to files:

  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/tests/documentation_cli_contract.rs
  • xtask/src/git_inventory.rs
  • xtask/src/fuzz_campaign/execution/error.rs
  • xtask/src/documentation_integrity/tool/tests.rs
  • xtask/src/documentation_integrity/execution/external_tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity.rs
  • xtask/src/bounded_process/deadline.rs
  • xtask/src/source_structure/source_kind.rs
  • xtask/src/documentation_integrity/tool.rs
  • xtask/src/fuzz_campaign/target.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/bounded_process/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/tests/cli_contract/documentation_tools.rs
  • xtask/src/fuzz_campaign/target/error.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/corpus/tests.rs
  • xtask/src/git_inventory/error.rs
  • xtask/tests/source_policy_contract.rs
  • xtask/src/documentation_integrity/dependabot.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/bounded_process/error.rs
  • xtask/src/documentation_integrity/dependabot/tests.rs
  • xtask/src/documentation_integrity/dependabot/manifest.rs
  • xtask/src/fuzz_campaign/execution.rs
  • xtask/src/bounded_process/reader.rs
  • xtask/src/documentation_integrity/node_toolchain/tests.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/task_error.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/main.rs
  • xtask/src/documentation_integrity/node_toolchain/unique_json.rs
  • xtask/src/fuzz_campaign/execution/tests.rs
  • xtask/tests/cli_contract.rs
  • xtask/src/repository_file.rs
  • xtask/src/git_inventory/path_stream.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process.rs
  • xtask/src/source_structure.rs
  • xtask/src/git_inventory/path_stream/tests.rs
  • xtask/src/source_structure/tests.rs
🪛 LanguageTool
docs/Documentation Standards.md

[uncategorized] ~553-~553: The official name of this software platform is spelled with a capital “H”.
Context: ...d. The dedicated documentation job in .github/workflows/ci.yml installs the pinned t...

(GITHUB)

🔇 Additional comments (49)
xtask/src/git_inventory.rs (1)

1-9: LGTM!

xtask/src/git_inventory/path_stream/tests.rs (1)

5-83: LGTM!

xtask/src/git_inventory/process/tests.rs (1)

5-28: LGTM!

xtask/src/documentation_integrity/corpus/tests.rs (1)

1-178: LGTM!

docs/dependencies/serde-and-serde-json-1.0.229-1.0.151.md (1)

1-74: LGTM!

xtask/src/bounded_process.rs (1)

64-91: 🩺 Stability & Availability

No change needed: early-return paths do not leave ReaderWorker threads detached.

ReaderWorker owns a non-detached JoinHandle<()>, and dropping the partially constructed ReaderWorker on stdout_reader.drop() clears that handle without calling handle.join(). Threads must be joined in normal reader completion, but Rust does not auto-join JoinHandle handles; these early-return paths return before the worker is expected to stop, and the spawned reader threads are already joined at successful collect() or can be restructured if this code is not expected to live until successful collection.

xtask/src/bounded_process/deadline.rs (1)

7-43: LGTM!

xtask/src/bounded_process/tests.rs (1)

15-45: LGTM!

Also applies to: 52-110

xtask/src/fuzz_campaign/execution.rs (1)

15-17: LGTM!

Also applies to: 78-82

xtask/src/fuzz_campaign/execution/error.rs (1)

6-60: LGTM!

xtask/src/fuzz_campaign/execution/tests.rs (1)

7-7: LGTM!

Also applies to: 84-90, 106-110, 129-136

xtask/src/fuzz_campaign/target.rs (1)

16-18: LGTM!

Also applies to: 53-53

xtask/src/fuzz_campaign/target/error.rs (1)

8-8: LGTM!

Also applies to: 113-115

docs/dependencies/documentation-toolchain.md (1)

34-48: LGTM!

CHANGELOG.md (1)

13-19: LGTM!

.gitignore (1)

9-10: LGTM!

xtask/src/repository_file.rs (1)

1-6: LGTM!

Also applies to: 17-37, 49-55, 65-90

xtask/src/source_structure.rs (1)

3-15: LGTM!

Also applies to: 46-46, 76-77, 86-105, 119-136, 207-209

xtask/src/documentation_integrity.rs (1)

1-51: LGTM!

xtask/src/documentation_integrity/repository_text/tests.rs (1)

1-52: LGTM!

xtask/src/documentation_integrity/error.rs (1)

1-140: LGTM!

xtask/Cargo.toml (1)

12-19: LGTM!

Also applies to: 29-32

xtask/src/main.rs (1)

11-36: LGTM!

Also applies to: 52-56, 112-125

xtask/src/task_error.rs (1)

8-8: LGTM!

Also applies to: 18-18, 42-42, 68-69, 81-81, 108-112

.github/workflows/ci.yml (1)

85-87: LGTM!

Also applies to: 101-107

CONTRIBUTING.md (1)

41-52: LGTM!

docs/Documentation Standards.md (1)

55-55: LGTM!

Also applies to: 537-589

xtask/src/source_structure/pure_rust_tests.rs (1)

1-14: LGTM!

xtask/src/source_structure/source_error.rs (1)

12-30: LGTM!

Also applies to: 41-44, 60-73, 75-93

xtask/src/source_structure/source_kind.rs (1)

1-24: LGTM!

xtask/src/source_structure/tests.rs (1)

65-107: LGTM!

Also applies to: 111-136, 139-179, 183-204, 208-267, 297-311, 314-328

xtask/src/documentation_integrity/contributor_contract.rs (1)

1-87: LGTM!

xtask/src/documentation_integrity/dependabot.rs (1)

1-82: LGTM!

Also applies to: 113-177

xtask/src/documentation_integrity/dependabot/manifest.rs (1)

1-64: LGTM!

xtask/src/documentation_integrity/dependabot/tests.rs (1)

1-93: LGTM!

xtask/src/documentation_integrity/repository_text.rs (1)

1-51: LGTM!

xtask/src/documentation_integrity/node_toolchain/tests.rs (1)

1-175: LGTM!

xtask/tests/source_policy_contract.rs (1)

4-4: LGTM!

Also applies to: 19-21

xtask/src/documentation_integrity/corpus.rs (2)

1-63: LGTM!

Also applies to: 83-174


64-82: 🎯 Functional Correctness

No change needed: paths() already returns BTreeSet<GitPath>.

The corpus selection path preserves deterministic ordering through BTreeSet.difference() before admission, so this concern does not apply.

xtask/src/documentation_integrity/tool.rs (1)

1-77: LGTM!

xtask/src/documentation_integrity/node_toolchain/unique_json.rs (1)

1-131: LGTM!

xtask/src/documentation_integrity/execution.rs (1)

1-172: LGTM!

xtask/src/documentation_integrity/execution/external_tests.rs (1)

1-80: LGTM!

xtask/src/documentation_integrity/execution/tests.rs (1)

1-171: LGTM!

xtask/src/documentation_integrity/tool/tests.rs (1)

1-64: LGTM!

xtask/tests/cli_contract.rs (1)

81-95: LGTM!

xtask/tests/cli_contract/documentation_tools.rs (1)

1-127: LGTM!

xtask/tests/documentation_cli_contract.rs (1)

1-21: LGTM!

Comment thread xtask/src/bounded_process.rs
Comment thread xtask/src/bounded_process.rs Outdated
Comment thread xtask/src/bounded_process/reader.rs Outdated
Comment thread xtask/src/bounded_process/tests.rs Outdated
Comment thread xtask/src/documentation_integrity/dependabot.rs Outdated
Comment thread xtask/src/documentation_integrity/node_toolchain.rs
Comment thread xtask/src/documentation_integrity/workflow_contract.rs
Comment thread xtask/src/fuzz_campaign/execution.rs
Comment thread xtask/src/git_inventory/path_stream.rs
Comment thread xtask/src/source_structure.rs
@flyingrobots

Copy link
Copy Markdown
Owner Author

@codex review please\n\n## Activity Summary\n\n| Priority | Finding | Commit | Outcome |\n| --- | --- | --- | --- |\n| P1 | Installer admission trusted a reachable substring | b8c7157 | Complete-file BLAKE3 admission now binds the exact reviewed installer bytes. |\n| P2 | Deadline cleanup leaked descendants and reader threads | ee3a18a | Dedicated process groups are terminated through safe Rustix APIs and every reader is joined. |\n| P2 | Pure-Rust admission missed pyw and executable extensionless Python | ba4fd74 | pyw variants and bounded executable Python or PyPy shebangs now receive typed refusal. |\n\nAll three original review threads are resolved with inline RED/GREEN evidence.\n\nLocal verification is green: all/default-minimal workspace checks; all-target Clippy with warnings denied; debug and release suites; five doctests; Rust 1.96; fuzz formatting, check, and Clippy; root and fuzz dependency policy; root and fuzz RustSec audits; both pinned external documentation regressions; pinned cargo xtask verify; whole-tree whitespace validation. The current debug xtask suite reports 174 passed and 2 intentionally ignored; both ignored tests pass when invoked with the pinned tools.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba4fd74b7e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread xtask/src/source_structure/python_source.rs Outdated
Comment thread xtask/src/bounded_process/capture.rs
Comment thread xtask/src/source_structure.rs Outdated
Comment thread xtask/src/documentation_integrity/workflow_contract.rs Outdated
@flyingrobots

Copy link
Copy Markdown
Owner Author

Self-review addendum

@codex please confirm this newly exposed portability defect.

Priority File Evidence Required mitigation
P2 xtask/src/bounded_process/process_group/tests.rs / xtask/src/test_directory.rs terminal_interrupt_terminates_the_isolated_descendant_group fails with EINVAL on macOS because the generated descendant.sock path is 108 bytes, beyond the Unix-domain socket path limit. Give socket fixtures a deliberately short, collision-resistant temporary path and retain explicit cleanup; add a regression that bounds the full socket pathname before bind.

@flyingrobots

Copy link
Copy Markdown
Owner Author

Self-review correction

The earlier socket-path diagnosis was disproved before commit: shortening the fixture path did not change the isolated EINVAL. A minimal UnixStream::pair regression shows macOS returns EINVAL when set_read_timeout is applied after the peer has already closed. The actual follow-up is therefore to preserve immediate disconnect success while retaining a finite/nonblocking read boundary; the speculative path-shortening change is being discarded. @codex please review the corrected evidence.

@flyingrobots

Copy link
Copy Markdown
Owner Author

Activity Summary — current head

@codex review please.

# Priority Source Outcome Commit
1 P1 Review Preserved the primary Git failure when cleanup also fails. 28fb59c
2 P1 Review Rejected workflow steps whose executable source cannot be classified. d20c6ba
3 P1 Review Refused non-regular executable candidates before source inspection. 222621a
4 P2 Review Parsed abbreviated env long options without misclassifying values as commands. c3bf334
5 P1 Review / #39 Retained exact policy-file identities across documentation validation. c8438ed
6 P1 Review / #39 Revalidated exact documentation corpus membership around tool execution. 89eacb7
7 P1 Review / #39 Bound documentation tools to a descriptor-admitted immutable snapshot. a90d56b
8 P1 Review / #40 Reconciled tracked executable modes with the admitted worktree snapshot. 0bd700e
9 P1 Review / #41 Required the fuzz-smoke workflow to prebuild every registered target. 7472c74
10 P1 Review / #42 Bounded the descendant disconnect witness. 4aeefb1
11 P1 Self / #42 Preserved closed-peer handling on macOS when read timeouts return EINVAL. 0af1d88
12 P2 Review / #39 Documented the corpus revalidation and snapshot contract. c71303f
13 P2 Review / #39#42 Documented internal validation invariants and refusal evidence. 5e8a962

All originating review threads are resolved.

Current-head local validation is green: repository structure and conformance gates; formatting; all-feature and minimal checks; Clippy with -D warnings; debug and release tests; doctests; MSRV 1.96; documentation refusal/integrity gates; whitespace; dependency policy and audits for root and fuzz manifests; and the no-Python repository mandate. The fuzz-smoke campaign prebuilt and ran all 8 registered targets with no crash or artifact; peak RSS was 508 MiB under the 1,024 MiB limit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e8a962763

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread xtask/src/documentation_integrity.rs Outdated
Comment thread xtask/src/documentation_integrity/execution/snapshot.rs Outdated
Comment thread xtask/src/documentation_integrity/execution.rs Outdated
Comment thread xtask/src/documentation_integrity/corpus.rs
Comment thread xtask/src/documentation_integrity/dependabot.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@xtask/src/documentation_integrity/corpus.rs`:
- Around line 80-89: Update the corpus verification flow around `source.verify`,
`Self::read`, and `membership_change` to revalidate retained sources against the
re-inventoried state before successful completion. Ensure same-path replacements
cannot pass based only on path membership, while preserving the existing
`CorpusChanged` error for membership changes.

In `@xtask/src/fuzz_campaign/workflow_tests.rs`:
- Around line 78-84: Update the workflow validation around the build and run
checks to inspect only executable run-step scalar values, not arbitrary workflow
text. Parse the workflow steps, identify actual commands matching “cargo xtask
fuzz build” and “cargo xtask fuzz run,” then preserve the assertion that the
build command precedes the run command.

In `@xtask/src/source_structure.rs`:
- Around line 10-17: Extract the duplicated admission/refusal logic from
inventory_violations and source_violations_with_modes into a shared
admit_regular helper that accepts source_root, the relative path, and
tracked_mode, returning the admitted regular source or the existing error.
Replace both loops’ repeated let-else unwrap blocks with
admit_regular(source_root, relative.as_path(), tracked_mode)? while preserving
their current error behavior.

In `@xtask/src/source_structure/pure_rust_tests.rs`:
- Around line 193-220: Move the shared run_git helper and its sanitized
environment configuration into a common test-support module alongside
TestDirectory, then update pure_rust_tests.rs,
documentation_integrity/execution/tests.rs, and
documentation_integrity/corpus/replacement_tests.rs to import and reuse it.
Remove the duplicated local definitions while preserving the existing bounded
execution and git environment contract.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ea3ab32b-d542-4575-be79-e604601063be

📥 Commits

Reviewing files that changed from the base of the PR and between 936dda5 and 5e8a962.

📒 Files selected for processing (33)
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • xtask/src/bounded_process/process_group/tests.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/documentation_integrity/corpus/replacement_tests.rs
  • xtask/src/documentation_integrity/corpus/source_witness.rs
  • xtask/src/documentation_integrity/dependabot.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/error/display/refusal.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/execution/corpus_guard.rs
  • xtask/src/documentation_integrity/execution/snapshot.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/fuzz_campaign/workflow_tests.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/source_structure.rs
  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/src/source_structure/python_source.rs
  • xtask/src/source_structure/python_source/environment.rs
  • xtask/src/source_structure/python_source/environment/long_options.rs
  • xtask/src/source_structure/python_source/environment/tests.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/source_structure/source_file.rs
  • xtask/src/source_structure/source_inventory.rs
  • xtask/src/source_structure/tests/replacement.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Rust quality gates
  • GitHub Check: Runtime fuzz smoke
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{rs,toml}

📄 CodeRabbit inference engine (AGENTS.md)

Use stable, pinned Rust with edition 2024; cargo fmt --check and Clippy with -D warnings must pass.

Files:

  • xtask/src/documentation_integrity/error/display/refusal.rs
  • xtask/src/documentation_integrity/corpus/replacement_tests.rs
  • xtask/src/source_structure/python_source/environment/long_options.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/fuzz_campaign/workflow_tests.rs
  • xtask/src/source_structure/python_source/environment/tests.rs
  • xtask/src/source_structure/tests/replacement.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/execution/snapshot.rs
  • xtask/src/source_structure/python_source.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process/process_group/tests.rs
  • xtask/src/source_structure.rs
  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/src/source_structure/source_inventory.rs
  • xtask/src/documentation_integrity/corpus/source_witness.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/documentation_integrity/execution/corpus_guard.rs
  • xtask/src/source_structure/source_file.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/source_structure/python_source/environment.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/dependabot.rs
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Do not use unwrap, expect, panic!, todo!, unimplemented!, dbg!, stdout/stderr printing, unchecked indexing, lossy casts, or unsafe code. Unsafe requires a dedicated crate with documented invariants, tests, and measured necessity.
Use checked arithmetic for externally influenced values and TryFrom/try_from instead of potentially lossy as conversions.
Public functions must not take boolean parameters; use enums instead. Prefer typed newtypes for IDs, lengths, offsets, generations, and namespaces.
Parse and validate untrusted bytes before admitting them as trusted types; make illegal states unrepresentable where practical.
Prefer concrete types, synchronous core APIs, and traits only at real substitution boundaries; do not introduce async without demonstrated consumer need.
Do not let HashMap iteration order affect identity, serialization, tests, or behavior.
Use hexagonal architecture: domain and port modules own invariants and semantic capabilities, dependencies point inward, and core/ports must not import adapters, filesystems, networks, CLIs, runtimes, or application policy.
Keep codecs at ingress and egress boundaries. Ports exchange semantic or validated types, not serializer-owned JSON, CBOR, or wire values.
Keep files near 200 lines, review files over 300, and do not exceed 500; keep functions near 20 logical lines, review over 40, do not exceed 60; limit nesting to 3 and parameters to 5.
Do not create generic utils.rs, helpers.rs, common.rs, misc.rs, shared.rs, manager.rs, service.rs, types.rs, or models.rs; name files after the concept they own.
Keep items private by default; use pub(crate) unless external consumers require public visibility. Public validated types must have private fields and checked constructors, and consequential staged work, plans, commits, and results should use #[must_use].
Use Option for normal absence, typed errors by boundary, preserved error sources, and expected/observed state in...

Files:

  • xtask/src/documentation_integrity/error/display/refusal.rs
  • xtask/src/documentation_integrity/corpus/replacement_tests.rs
  • xtask/src/source_structure/python_source/environment/long_options.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/fuzz_campaign/workflow_tests.rs
  • xtask/src/source_structure/python_source/environment/tests.rs
  • xtask/src/source_structure/tests/replacement.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/execution/snapshot.rs
  • xtask/src/source_structure/python_source.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process/process_group/tests.rs
  • xtask/src/source_structure.rs
  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/src/source_structure/source_inventory.rs
  • xtask/src/documentation_integrity/corpus/source_witness.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/documentation_integrity/execution/corpus_guard.rs
  • xtask/src/source_structure/source_file.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/source_structure/python_source/environment.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/dependabot.rs
**/*.{rs,json,cbor}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,json,cbor}: Identity, persistence, comparison, tests, and protocol behavior must be deterministic and independent of iteration order, host state, clocks, locale, and serializer defaults.
Boundary JSON and CBOR must use a named canonical profile with golden fixtures; reject duplicate fields and noncanonical identity-bearing encodings. Hash only typed, domain-separated canonical bytes.

Files:

  • xtask/src/documentation_integrity/error/display/refusal.rs
  • xtask/src/documentation_integrity/corpus/replacement_tests.rs
  • xtask/src/source_structure/python_source/environment/long_options.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/fuzz_campaign/workflow_tests.rs
  • xtask/src/source_structure/python_source/environment/tests.rs
  • xtask/src/source_structure/tests/replacement.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/execution/snapshot.rs
  • xtask/src/source_structure/python_source.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process/process_group/tests.rs
  • xtask/src/source_structure.rs
  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/src/source_structure/source_inventory.rs
  • xtask/src/documentation_integrity/corpus/source_witness.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/documentation_integrity/execution/corpus_guard.rs
  • xtask/src/source_structure/source_file.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/source_structure/python_source/environment.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/dependabot.rs
**/*.{rs,bin}

📄 CodeRabbit inference engine (AGENTS.md)

Durable formats must define magic bytes, versioning, canonical encoding, explicit endianness, bounds, checksums, and golden fixtures; reject trailing bytes, duplicate fields, noncanonical encodings, overflow, invalid ordering, excessive depth, and unknown mandatory flags. Do not use arbitrary Serde or Rust struct output as a durable format.

Files:

  • xtask/src/documentation_integrity/error/display/refusal.rs
  • xtask/src/documentation_integrity/corpus/replacement_tests.rs
  • xtask/src/source_structure/python_source/environment/long_options.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/fuzz_campaign/workflow_tests.rs
  • xtask/src/source_structure/python_source/environment/tests.rs
  • xtask/src/source_structure/tests/replacement.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/execution/snapshot.rs
  • xtask/src/source_structure/python_source.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process/process_group/tests.rs
  • xtask/src/source_structure.rs
  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/src/source_structure/source_inventory.rs
  • xtask/src/documentation_integrity/corpus/source_witness.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/documentation_integrity/execution/corpus_guard.rs
  • xtask/src/source_structure/source_file.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/source_structure/python_source/environment.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/dependabot.rs
🧠 Learnings (1)
📚 Learning: 2026-07-27T22:37:16.896Z
Learnt from: flyingrobots
Repo: flyingrobots/keep PR: 49
File: src/layout/record_length.rs:29-29
Timestamp: 2026-07-27T22:37:16.896Z
Learning: This repository targets Rust 1.96 (per `Cargo.toml` `rust-version` and `rust-toolchain.toml`). When writing or reviewing Rust code, only use APIs/language features stabilized in Rust 1.96 or earlier. Avoid using newer std/library APIs that wouldn’t be available on Rust 1.96 (e.g., you may rely on `u64::is_multiple_of` since it’s stabilized by 1.96).

Applied to files:

  • xtask/src/documentation_integrity/error/display/refusal.rs
  • xtask/src/documentation_integrity/corpus/replacement_tests.rs
  • xtask/src/source_structure/python_source/environment/long_options.rs
  • xtask/src/documentation_integrity/contributor_contract.rs
  • xtask/src/documentation_integrity/error.rs
  • xtask/src/fuzz_campaign/workflow_tests.rs
  • xtask/src/source_structure/python_source/environment/tests.rs
  • xtask/src/source_structure/tests/replacement.rs
  • xtask/src/documentation_integrity/repository_text/tests.rs
  • xtask/src/documentation_integrity/repository_text.rs
  • xtask/src/documentation_integrity/execution/snapshot.rs
  • xtask/src/source_structure/python_source.rs
  • xtask/src/git_inventory/process.rs
  • xtask/src/bounded_process/process_group/tests.rs
  • xtask/src/source_structure.rs
  • xtask/src/source_structure/pure_rust_tests.rs
  • xtask/src/source_structure/source_inventory.rs
  • xtask/src/documentation_integrity/corpus/source_witness.rs
  • xtask/src/source_structure/source_error.rs
  • xtask/src/documentation_integrity/corpus.rs
  • xtask/src/documentation_integrity/workflow_contract/tests.rs
  • xtask/src/documentation_integrity/node_toolchain.rs
  • xtask/src/documentation_integrity/execution/tests.rs
  • xtask/src/documentation_integrity/execution/corpus_guard.rs
  • xtask/src/source_structure/source_file.rs
  • xtask/src/documentation_integrity/error/display.rs
  • xtask/src/documentation_integrity/execution.rs
  • xtask/src/documentation_integrity/workflow_contract.rs
  • xtask/src/source_structure/python_source/environment.rs
  • xtask/src/git_inventory/process/tests.rs
  • xtask/src/documentation_integrity/dependabot.rs
🔇 Additional comments (35)
xtask/src/source_structure/python_source/environment/tests.rs (1)

44-57: LGTM!

xtask/src/documentation_integrity/contributor_contract.rs (1)

14-21: LGTM!

xtask/src/git_inventory/process.rs (1)

10-10: LGTM! Confirms the previously-flagged Git-failure-precedence issue is resolved — inventory_output now checks output.succeeded before decoding stdout.

Also applies to: 52-63

xtask/src/git_inventory/process/tests.rs (1)

12-15: LGTM!

Also applies to: 68-89

xtask/src/source_structure/pure_rust_tests.rs (1)

7-10: LGTM!

Also applies to: 123-148

xtask/src/source_structure/python_source.rs (1)

111-112: LGTM!

xtask/src/source_structure/python_source/environment.rs (1)

3-9: LGTM! Traced the abbreviation dispatch against the new long_options table end-to-end (including the --spl=, --ignore-e, --uns test cases) — correctly resolves to python3 and correctly fails closed on invalid/ambiguous long options.

Also applies to: 67-81, 118-122

xtask/src/source_structure/python_source/environment/long_options.rs (1)

1-101: LGTM! Verified the abbreviation-matching logic against GNU coreutils env.c's actual struct option table and value-mode semantics (required_argument/optional_argument/no_argument/split) — matches correctly. The table omits --version, but confirmed via env(1) that --version (like the modeled --help) causes env to exit before ever invoking the target command, so this omission has no exploitable effect on Python-shebang detection.

xtask/src/source_structure/source_inventory.rs (1)

27-27: LGTM! Tracked-mode record parsing is properly defensive (checked offsets, rejects malformed/unmerged/duplicate entries, revalidates the path via admit_inspection_path).

Also applies to: 51-54, 70-129

xtask/src/source_structure/tests/replacement.rs (1)

13-15: LGTM! Traced the new nonregular_executable_candidate_is_refused test end-to-end against inventory_violations — correctly proves the nonregular-candidate bypass is closed.

Also applies to: 31-35, 57-61, 86-90, 140-170

xtask/src/source_structure/source_error.rs (1)

12-24: LGTM!

Also applies to: 53-68, 113-120

xtask/src/source_structure/source_file.rs (1)

19-26: LGTM!

Also applies to: 45-84, 133-168

.github/workflows/ci.yml (1)

137-139: LGTM!

CHANGELOG.md (1)

31-56: LGTM!

Also applies to: 67-68, 77-80, 117-126

xtask/src/bounded_process/process_group/tests.rs (1)

160-165: LGTM!

Also applies to: 183-206

xtask/src/documentation_integrity/corpus.rs (1)

9-11: LGTM!

Also applies to: 49-59, 126-143, 177-177

xtask/src/documentation_integrity/corpus/replacement_tests.rs (1)

24-24: LGTM!

Also applies to: 38-62

xtask/src/documentation_integrity/corpus/source_witness.rs (1)

4-34: LGTM!

Also applies to: 45-75, 108-147, 169-170

xtask/src/documentation_integrity/repository_text/tests.rs (1)

15-15: LGTM!

Also applies to: 30-52

xtask/src/documentation_integrity/workflow_contract/tests.rs (1)

89-103: LGTM!

Also applies to: 153-153

xtask/src/documentation_integrity/workflow_contract.rs (2)

115-147: 🎯 Functional Correctness

Fail-closed else-branch matches the previously accepted fix.

The else { return Err(contract(...)) } branch here is exactly the fix already confirmed addressed in a prior review round for the "unclassified step mapping silently excluded" finding — correctly implemented.


24-28: LGTM!

xtask/src/documentation_integrity/dependabot.rs (1)

23-31: LGTM!

xtask/src/documentation_integrity/error.rs (2)

19-151: LGTM!


159-201: LGTM!

xtask/src/documentation_integrity/error/display.rs (1)

27-87: LGTM!

Also applies to: 121-167

xtask/src/documentation_integrity/error/display/refusal.rs (1)

7-23: LGTM!

xtask/src/documentation_integrity/execution.rs (3)

166-212: LGTM!


30-39: LGTM!


52-58: 🩺 Stability & Availability

Inspect whether cleanup errors are discarded on check failures.

This depends on the final run_with(&mut runner, ...) / runner.close() call graph and whether combine_checks(result, cleanup) is preferred over early short-circuiting.

xtask/src/documentation_integrity/execution/corpus_guard.rs (1)

12-89: LGTM!

xtask/src/documentation_integrity/execution/snapshot.rs (1)

42-267: LGTM!

xtask/src/documentation_integrity/execution/tests.rs (1)

155-183: LGTM!

Also applies to: 210-254

xtask/src/documentation_integrity/node_toolchain.rs (1)

24-33: LGTM!

xtask/src/documentation_integrity/repository_text.rs (1)

12-94: LGTM!

Comment thread xtask/src/documentation_integrity/corpus.rs Outdated
Comment thread xtask/src/fuzz_campaign/workflow_tests.rs Outdated
Comment thread xtask/src/source_structure.rs
Comment thread xtask/src/source_structure/pure_rust_tests.rs Outdated

Copy link
Copy Markdown
Owner Author

Activity Summary

All nine review threads are resolved (eight unique findings; the corpus-identity race was reported twice). Each actionable finding has an isolated commit and targeted evidence.

Priority Source Finding Commit Outcome
P1 Codex Fixed policy witnesses expired before tool execution 269a9cc Retained all seven identities through execution and revalidated afterward.
P1 Codex + CodeRabbit Corpus identity could change across the inventory boundary 3bb20e8 Added post-membership identity revalidation; resolved both duplicate threads.
P2 Codex Non-Markdown link targets were replaced with empty placeholders b3c2c43 Snapshot exact bounded regular bytes and refuse nonregular targets.
P2 Codex Snapshot cleanup could hide a simultaneous tool failure 35195e5 Preserve both typed failures.
P2 Codex Duplicate Dependabot YAML keys lacked explicit regression evidence 5b22aed Locked existing parser refusal at top-level and nested mappings.
P2 CodeRabbit Fuzz workflow checks could accept inert run text 8ce0b83 Parse only executable step run scalars and command boundaries.
P3 CodeRabbit Regular-source admission was duplicated 4765446 Centralized one admission/refusal authority with an architecture law.
P4 CodeRabbit Sanitized Git fixture execution was duplicated 4bf791c Centralized one hermetic, process-group-bounded fixture executor with an architecture law.
Policy upkeep Self Changelog ownership language lagged the shared fixture boundary 1254cdc Aligned the living contract and reran the full documentation gate.

Current-head local evidence is green:

  • Golden File Worldline, conformance, source-structure, formatting, full/minimal check and Clippy.
  • Debug, release, doctest, and Rust 1.96 MSRV matrices.
  • Documentation refusal/integrity, whole-tree whitespace, dependency policy, and both RustSec audits.
  • All eight registered fuzz targets built and completed bounded smoke campaigns with no crash artifacts or timeouts; peak observed RSS was 519 MiB under the 1,024 MiB cap.
  • rg --files -g '*.py' returned no paths.

@codex review please — confirm the current head 1254cdc, including the remediation series and documentation upkeep.

@flyingrobots
flyingrobots merged commit d0f1ec5 into main Jul 29, 2026
5 checks passed
@flyingrobots
flyingrobots deleted the maintenance/documentation-xtask branch July 29, 2026 04:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

for plan in plans {
let failure = match runner.execute(repository_root, plan) {
Ok(output) => classify_output(plan, &output),
Err(error) => Some(TargetFailureReason::Process(error)),
};

P1 Badge Stop the fuzz campaign after a terminal interruption

When a campaign has multiple target plans and the operator sends one SIGINT, SIGTERM, SIGHUP, or SIGQUIT, the process guard converts and consumes it as ProcessError::Interrupted, but this branch merely records one target failure and continues the loop. Subsequent targets can therefore run for their full per-target deadlines after a Ctrl-C or CI cancellation request; propagate interruption immediately instead of aggregating it like an ordinary target failure.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

source_process_directory,
&materialized,
)?;
verify_sources(source_root, source_process_directory, corpora, &config)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Revalidate non-corpus snapshot inputs after every tool

When .markdownlint-cli2.yaml or a non-Markdown link target changes after snapshot creation, this is its final identity check: DocumentationSnapshot retains neither the configuration witness nor namespace-file witnesses, while CorpusGuardedRunner::verify checks only Markdown and workflow corpora. The tools can therefore validate stale snapshot bytes and return success even though the current repository now has different lint policy or a missing/replaced link target; retain and revalidate all snapshotted inputs through the final success boundary.

AGENTS.md reference: AGENTS.md:L78-L81

Useful? React with 👍 / 👎.

Comment on lines +154 to +157
fn cleanup_readers(self, error: ProcessError) -> ProcessError {
let mut child = self.child;
let error = cleanup_process(&mut child, error);
join_readers(self.stdout, self.stderr, error)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bound reader teardown when descendants escape the process group

When a tool forks a grandchild that calls setsid while retaining stdout or stderr, the deadline expires and cleanup_process kills only the original process group, after which this unconditional join_readers waits forever for EOF from the escaped grandchild. Thus captured documentation, Git-inventory, and fuzz commands can exceed their advertised complete-operation deadline indefinitely; teardown needs a bounded way to close or cancel the reader workers even when process-group ownership is lost.

Useful? React with 👍 / 👎.

Comment on lines +145 to +148
fn command_index(commands: &[String], expected: &str) -> Option<usize> {
commands.iter().position(|command| {
command.lines().any(|line| {
line.trim().strip_prefix(expected).is_some_and(|suffix| {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require executable fuzz commands instead of matching heredoc text

In the checked ci.yml and fuzz-scheduled.yml jobs, this still accepts any line inside a run scalar, including heredoc data: an earlier step containing cat <<'EOF' followed by cargo xtask fuzz build --profile smoke and EOF satisfies command_index, although no build executes before the later run step. The regression gate can therefore remain green after the required build, corpus check, or minimization command becomes inert; require the reviewed commands as exact executable step bodies rather than searching arbitrary shell lines.

AGENTS.md reference: AGENTS.md:L103-L105

Useful? React with 👍 / 👎.

Comment on lines +139 to +142
let status = wait_for_child(program, &mut self.child, deadline, &self.interrupts)?;
refuse_exceeded(program, "stdout", self.limits.stdout_bytes(), &stdout).and_then(|()| {
refuse_exceeded(program, "stderr", self.limits.stderr_bytes(), &stderr)
})?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Terminate descendants before returning late capture failures

When a child starts a same-group background descendant with stdout and stderr closed, emits oversized output, and exits, both readers reach EOF and wait_for_child reaps the group leader before this output-limit check fails. No cleanup then runs, so the background descendant continues indefinitely and the waitable identity that made group termination safe has already been consumed; detect late output or interrupt failures and terminate the group before reaping the leader.

Useful? React with 👍 / 👎.

Comment on lines +50 to +51
fn admitted_steps(workflow: &str) -> Result<Vec<DocumentationStep>, DocumentationError> {
let documents = YamlLoader::load_from_str(workflow).map_err(|source| {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add fuzz coverage for the new YAML admission boundary

The new workflow and Dependabot admission paths parse externally influenced YAML through YamlLoader, but a repository-wide check of fuzz/fuzz_targets finds no target exposing either YAML admission function; only the new JSON parser received a fuzz boundary. Malformed aliases, nesting, duplicate-key interactions, and scalar edge cases therefore lack the required parser fuzz evidence, so expose the production YAML admission boundary and register a bounded target for it.

AGENTS.md reference: AGENTS.md:L118-L118

Useful? React with 👍 / 👎.

@@ -0,0 +1,68 @@
# Dependency Admission: yaml-rust2 0.11.0

- Status: Accepted for repository-task workflow admission only

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document Dependabot in the YAML dependency admission

This admission is labeled and justified as workflow-only, but documentation_integrity/dependabot.rs also uses yaml-rust2 to parse .github/dependabot.yml in the production repository task. The record consequently omits the second admitted input, its policy-validation purpose, and its failure boundary even though its own final section requires reopening when admitted YAML use changes; update the dependency admission so the reviewed scope matches the code.

AGENTS.md reference: AGENTS.md:L143-L143

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move documentation and workflow integrity checks into xtask

1 participant