Skip to content

feat(agent-loop): enforce machine-checkable chunk scope - #203

Merged
abiorh-claw merged 8 commits into
mainfrom
codex/ws-eng-008-01-machine-checkable-scope
Jul 26, 2026
Merged

feat(agent-loop): enforce machine-checkable chunk scope#203
abiorh-claw merged 8 commits into
mainfrom
codex/ws-eng-008-01-machine-checkable-scope

Conversation

@Abiorh001

@Abiorh001 Abiorh001 commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

PR Trust Bundle: WS-ENG-008-01

Chunk

WS-ENG-008-01 — Machine-Checkable Chunk Scope

Merge intent: .agent-loop/merge-intents/WS-ENG-008-01.json

Goal

Make every post-cutover implementation/specification PR prove its complete Git
delta against the exact machine-readable contract selected by signed start.

Human-approved intent

The approved contract is
.agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-01-machine-checkable-chunk-scope.md.

Signed Start Provenance

  • Signed start run: 30191914510
  • Authorized main SHA: bd2203d5e8a972d8afbf833805b92ed70dedee4a
  • Phase: implementation
  • Contract path: .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-01-machine-checkable-chunk-scope.md
  • Signed contract blob SHA: 2fb0afba71653e7aefcc074079fe98f44051c068
  • Reviewed implementation SHA: 1ef5c3bd0bffedec684ae8b6cec2e6affbcb3b21

What changed

  • Added strict schema-v1 contract parsing and closed path/command/reviewer registries.
  • Added authenticated signed-ledger start selection and exact contract-blob custody.
  • Added byte-safe complete Git delta, mode, Unicode, and collision enforcement.
  • Added trusted-base Agent Gates execution with one bounded cutover bootstrap.
  • Upgraded ENG-008 contracts 02–07 before naming chunk 02.
  • Updated contributor, architecture, glossary, policy, and contract-template guidance.

Design chosen

The signed ledger selects authority; the immutable start blob supplies machine
scope. Agent Gates authenticate generated state, reduce initiative-local events,
compare all base/head/index/worktree paths, and execute only repository-owned
command mappings. After cutover the interpreter and validators come from the
trusted base rather than candidate code. Work already active at cutover may
finish only under its exact signed legacy Allowed-files fence.

Scope control

All 22 implementation files are explicitly listed by the signed human contract
and the new bootstrap machine block. No product, API, database, migration,
authorization, payment, signing, start/cancel, branch-protection, secret,
dependency, or coverage behavior changed.

Final reconciliation found no overlap with active REV PR #195 or the concurrent
AUTH/ART work. Stale PR #149 overlaps the evidence checker and Agent Gate tests;
it has no ENG-008 authority and must rebase and satisfy the post-cutover scope
gate independently.

Acceptance criteria proof

  • Strict schema and human agreement: parser mutations plus all seven ENG-008 contracts pass.
  • Closed path grammar and complete Git delta: 27 focused unit/integration tests pass.
  • Signed cutover/grandfather custody: authenticated ledger fixtures and exact live state pass.
  • Reviewer/command binding: internal evidence gate regression passes.
  • Trusted Agent Gate integration: 102 regression tests pass.
  • Successor control: one schema-v2 intent names WS-ENG-008-02 with explicit start required.

Tests/checks run

python3 scripts/check_chunk_contract.py --base-ref origin/main --head-ref HEAD --state-ref origin/automation/loop-memory
python3 scripts/test_check_chunk_contract.py
python3 scripts/test_agent_gates.py
python3 scripts/update_post_merge_memory.py validate-merge-intent --repository-root . --base-ref origin/main
python3 scripts/check_internal_review_evidence.py
python3 scripts/check_markdown_links.py
python3 scripts/check_stale_workstream_wording.py
ruff check scripts/check_chunk_contract.py scripts/check_internal_review_evidence.py scripts/test_check_chunk_contract.py scripts/test_agent_gates.py
git diff --check origin/main...HEAD

Result: all passed on the reviewed implementation plus evidence-only publication.

Test delta

  • Added 27 focused schema, signed-state, path, Git-mode, collision, and workflow tests.
  • Added Agent Gate regressions for trusted execution and evidence binding.
  • No test was removed, skipped, deselected, or weakened.

CI integrity

  • Coverage thresholds and existing 90-percent loop-memory coverage jobs are unchanged.
  • No continue-on-error, path exclusion, unpinned action, permission expansion,
    credential persistence, package-script bypass, or test weakening was added.

Reviewer results

Reviewed code SHA: 1ef5c3bd0bffedec684ae8b6cec2e6affbcb3b21

Reviewed at: 2026-07-26T07:48:30Z

Reviewer run IDs: ci02b_lane_runner, ci02b_cr_arch, ci02b_cr_ci, ci02b_cr_docs, ci02b_cr_reuse, ci02b_cr_test_delta

All nine required tracks passed. Architecture and reuse recorded only Low-risk
future consolidation opportunities; there are no blocking findings.

Remaining risks

Some validated-ledger, merge-intent, and reviewer-name parsing remains locally
duplicated. Consolidating authority-sensitive helpers requires its own reviewed
contract and must not delay this closed enforcement cutover.

Human review focus

  • Trusted-base versus one-time bootstrap execution in agent-gates.yml.
  • Signed-ledger and exact-blob selection, including grandfather reduction.
  • NUL/Unicode/mode/collision handling in check_chunk_contract.py.
  • Exact schema blocks for successors 02–07.

External review

  • CodeRabbit: pending
  • GitHub checks: pending

Human ownership

The PR remains stopped for explicit review and merge approval. Its merge will
not start WS-ENG-008-02.

Summary by CodeRabbit

  • New Features

    • Added machine-checkable change scopes with explicit allowed paths, required reviews, and verification checks.
    • Added fail-closed validation to prevent unauthorized files or commands from being included in implementation work.
    • Added signed-state tracking and review evidence requirements for engineering changes.
  • Documentation

    • Updated contributor guidance, templates, policies, architecture notes, and glossary for the repository-native engineering process.
  • Tests

    • Added extensive coverage for scope validation, signed-state integrity, path safety, reviewer routing, and workflow enforcement.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 20 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 64af03cb-faee-4f67-8139-2f5d7e5961e4

📥 Commits

Reviewing files that changed from the base of the PR and between 55dcad6 and a6668d6.

📒 Files selected for processing (10)
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/STATUS.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-external-review-response.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-internal-review-evidence.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-pr-trust-bundle.md
  • .agent-loop/templates/CHUNK_CONTRACT.md
  • .github/workflows/agent-gates.yml
  • scripts/check_chunk_contract.py
  • scripts/check_internal_review_evidence.py
  • scripts/test_agent_gates.py
  • scripts/test_check_chunk_contract.py
📝 Walkthrough

Walkthrough

The PR introduces schema-v1 machine-checkable chunk scopes, signed-state contract selection, complete Git delta enforcement, Agent Gates integration, reviewer evidence binding, updated governance documentation, and extensive validation tests for WS-ENG-008.

Changes

Chunk scope enforcement

Layer / File(s) Summary
Scope contracts and repository policy
.agent-loop/initiatives/..., .agent-loop/policies/*, .agent-loop/templates/*, AGENTS.md, CONTRIBUTING.md, README.md, docs/*, .agent-loop/merge-intents/*
Chunk contracts now contain schema-v1 scope JSON with allowed and forbidden paths, reviewers, and verification identifiers. Policies and documentation define fail-closed matching, cutover, and grandfather rules.
Contract parsing and Git enforcement
scripts/check_chunk_contract.py
Adds strict contract parsing, path normalization and matching, Git status and mode validation, signed-state authentication, contract selection, change discovery, and a pass/fail CLI.
Workflow and evidence integration
.github/workflows/agent-gates.yml, scripts/check_internal_review_evidence.py
Agent Gates fetch signed loop-memory state and run scope validation. Review evidence must match required reviewers and prove all declared verification commands.
Review records and tests
.agent-loop/initiatives/.../reviews/*, scripts/test_agent_gates.py, scripts/test_check_chunk_contract.py
Review artifacts record provenance, outcomes, commands, and boundaries. Tests cover schema mutations, path safety, signed history, workflow enforcement, and Git working-tree discovery.

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

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant AgentGates
  participant ScopeValidator
  participant SignedLoopMemory
  participant Git
  participant ReviewEvidence

  PullRequest->>AgentGates: submit base, head, and changed files
  AgentGates->>SignedLoopMemory: fetch authenticated state
  AgentGates->>ScopeValidator: validate chunk scope
  ScopeValidator->>Git: inspect signed contract and complete delta
  Git-->>ScopeValidator: contract and changed paths
  ScopeValidator-->>AgentGates: scope pass or failure
  AgentGates->>ReviewEvidence: validate reviewer tracks and commands
  ReviewEvidence-->>AgentGates: evidence pass or failure
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.32% 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 The title is concise and accurately summarizes the main change: enforcing machine-checkable chunk scope.
Description check ✅ Passed The description covers the required trust-bundle sections and most template fields, with only a few non-critical sections omitted.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ws-eng-008-01-machine-checkable-scope

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.

@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: 10

🧹 Nitpick comments (6)
scripts/test_check_chunk_contract.py (4)

191-277: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Second select_contract call depends on leaving the mock scope — make that explicit.

Line 254 relies on the fact that verify_state_ref is no longer patched once the with block at Lines 242-245 exits, which is easy to break with an innocent re-indent. A one-line comment (or an explicit # unpatched: real signature verification must fail) would preserve the intent.

🤖 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 `@scripts/test_check_chunk_contract.py` around lines 191 - 277, The second
select_contract call after the initial mock.patch.object scope relies on real
verify_state_ref execution to produce the authentication failure. Add a concise
comment immediately before that call explicitly stating that verification is
intentionally unpatched and must fail with “authentication failed”; leave the
existing call and assertions unchanged.

418-423: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

These two tests assume a case-sensitive filesystem tolerating invalid UTF-8 names.

readme.md alongside README.md (Line 421) and b"bad-\xff" (Line 507) will not reproduce on macOS/APFS or Windows, so a local run fails or silently passes for the wrong reason. Skipping when the filesystem cannot represent the case keeps the suite runnable off Linux CI.

Also applies to: 506-520

🤖 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 `@scripts/test_check_chunk_contract.py` around lines 418 - 423, Update
test_untracked_case_collision_with_unchanged_head_is_rejected and the related
invalid-UTF-8 filename test to detect whether the filesystem supports the
required case collision and byte-name representation before creating fixtures.
Skip each test when its filesystem capability is unavailable, while preserving
the existing assertions on filesystems that support the scenarios.

278-334: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Unused repository fixture and a test name that overstates coverage.

test_rejects_stopped_projection_and_blob_mutation only exercises signed_contract_blob; nothing asserts stopped-projection behavior. In test_grandfather_requires_active_exact_cutover_parent_and_prestart, the whole temp-repo setup on Lines 297-316 is never read — require_grandfather is driven purely by the in-memory records tuple. Drop the dead repo setup (or assert against it) and rename the first test to match what it verifies.

🤖 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 `@scripts/test_check_chunk_contract.py` around lines 278 - 334, Rename
test_rejects_stopped_projection_and_blob_mutation to reflect that it only
verifies signed_contract_blob path/blob mutation rejection. In
test_grandfather_requires_active_exact_cutover_parent_and_prestart, remove the
unused temporary repository setup and related git/file operations, keeping the
in-memory records and require_grandfather assertions intact.

336-377: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer contextlib.ExitStack over the common tuple.

Pre-constructing patchers in a tuple at Lines 353-359 and entering them as common[0], common[1] is harder to read than duplicating the two patches or stacking them; it also silently breaks if the tuple is ever entered twice.

🤖 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 `@scripts/test_check_chunk_contract.py` around lines 336 - 377, Replace the
pre-constructed common patcher tuple in
test_select_rejects_stopped_and_post_cutover_no_schema_starts with
contextlib.ExitStack, entering the shared added_merge_intent and
verify_state_ref patches through the stack for the first assertion. Keep the
test’s existing behavior and separate second assertion setup unchanged.
scripts/test_agent_gates.py (1)

6499-6533: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider anchoring the script assertions to the actual step, not the whole file.

Lines 6509-6514 assert bare substrings anywhere in the workflow, so an unrelated mention would satisfy them. The neighbouring test at Line 6478 already parses the YAML and matches the exact step; doing the same for the trusted-materialization loop would make this regression harder to defeat.

🤖 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 `@scripts/test_agent_gates.py` around lines 6499 - 6533, Update
test_machine_chunk_scope_gate_is_mandatory_and_signed_state_bound to parse the
workflow YAML and locate the trusted-materialization loop step, then assert the
required script names, git show command, trusted_checker invocation, PYTHONPATH,
and copy command within that step’s content instead of searching the entire
workflow text. Follow the exact-step matching approach used by the neighboring
test.
scripts/check_chunk_contract.py (1)

323-327: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Add a timeout and -- ref separation to the shared git runner.

Two hardening gaps in the single choke point for all Git execution:

  • No timeout=, so a hung git (credential prompt, slow fetch of a missing ref) blocks the gate job indefinitely rather than failing closed.
  • Ref values arrive from --base-ref/--head-ref and are interpolated directly (rev-parse --verify f"{ref}^{{commit}}", ls-tree state_ref). A value beginning with - is parsed as a Git option. Validating refs against a conservative pattern (or inserting --) keeps the trust boundary explicit even though the workflow supplies these today.

The static-analysis “command injection” hits on Lines 323 and 603 are otherwise false positives — the argv is a fixed list, not a shell string.

♻️ Suggested change
 def _git(repo: Path, *args: str) -> bytes:
-    proc = subprocess.run(["git", *args], cwd=repo, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+    proc = subprocess.run(
+        ["git", *args], cwd=repo, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+        timeout=GIT_TIMEOUT_SECONDS,
+    )
     if proc.returncode:
         raise ContractError(f"git {' '.join(args)} failed: {proc.stderr.decode('utf-8', 'replace').strip()}")
     return proc.stdout

subprocess.TimeoutExpired should be mapped to ContractError (or added to the except tuple in main) so the gate keeps its stable failure surface.

🤖 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 `@scripts/check_chunk_contract.py` around lines 323 - 327, Harden the shared
_git runner by supplying the configured subprocess timeout and converting
subprocess.TimeoutExpired into ContractError so callers retain the stable
failure surface. Ensure ref-derived Git arguments are protected with explicit --
separators or conservative validation, including rev-parse and ls-tree paths,
while keeping the fixed argv execution unchanged.

Source: Linters/SAST tools

🤖 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
@.agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-internal-review-evidence.md:
- Around line 23-27: Restore the truncated provenance SHAs to their exact
40-character values consistently across all review records: update the reviewed
code SHA at
.agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-internal-review-evidence.md
lines 23-27, the signed state commit at lines 15-19, and both reviewed
implementation SHA references in
.agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-pr-trust-bundle.md
lines 26 and 97. Use the authoritative full values already present in the
corresponding assurance blocks and ensure every reference matches exactly.
- Around line 65-82: Align the “Commands Run” fence and “Results” section in the
internal review evidence: either add the exact Ruff check invocation to the
commands list or remove the Ruff passing claim from Results. Keep the evidence
fence authoritative and update only the affected command/result text.

In
@.agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-pr-trust-bundle.md:
- Around line 97-104: Update the trust bundle’s reviewer evidence so all nine
required tracks are mapped to reviewer run IDs, matching the nine rows in the
evidence table. Add the missing run IDs or explicitly document which named
tracks shared a session, ensuring the “All nine required tracks passed” claim is
self-verifying.

In
@.agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/STATUS.md:
- Line 12: Correct the ENG start projection commit SHA in the “Signed start run”
entry to the valid 40-character commit object ID, preserving the existing
provenance reference and formatting.

In @.agent-loop/templates/CHUNK_CONTRACT.md:
- Around line 57-62: Update the required_reviewers contract example and guidance
so the JSON array includes every applicable conditional track in addition to the
baseline reviewers, keeping it aligned with the human review requirements. Add
or update tests covering agreement between the machine-readable array and the
human review rules, including applicable architecture, CI, docs, reuse/dedup,
and test-delta reviewers.
- Around line 45-50: Update the mandatory chunk-scope JSON example in
CHUNK_CONTRACT.md so phase and risk_class are clearly placeholders or otherwise
represent the permitted values, rather than hard-coding “implementation” and
“L1”. Preserve the documented allowed phase “specification” and risk classes
“L0”–“L4” so copied metadata remains valid.

In @.github/workflows/agent-gates.yml:
- Around line 32-54: Update the fallback branch in the “Machine-checkable chunk
scope” workflow to positively test for the
.agent-loop/merge-intents/WS-ENG-008-01.json cutover marker and explicitly exit
1 when it exists. Remove the negated git cat-file check, and only copy the local
scripts when the marker is absent.

In `@scripts/check_chunk_contract.py`:
- Around line 431-441: Move the guarded imports in the state-ref authentication
flow before the try/except, or otherwise ensure LoopMemoryError is bound before
handler evaluation. Keep verify_generated_state_signature and
generated_state_failures execution covered by the existing exception mapping so
any import or validation failure consistently raises ContractError with the
“state-ref authentication failed” message.
- Around line 636-641: Wrap every relevant UTF-8 decode in
scripts/check_chunk_contract.py—including machine_block_or_none and the bare
decode calls near machine_block, parse-contract handling, and related validation
paths—so UnicodeDecodeError is converted into ContractError with the existing
stable gate-failure message. Preserve current successful decoding and validation
behavior, and ensure main continues to handle malformed non-UTF-8 contract blobs
through ContractError rather than a raw traceback.

In `@scripts/check_internal_review_evidence.py`:
- Around line 6-19: Make check_internal_review_evidence.py load
check_chunk_contract from a base-ref-sourced trusted path instead of the PR
workspace. Apply this to parse_contract_bytes, ScopeContract, and
VERIFICATION_COMMANDS used by machine_contract_for and
validate_machine_evidence, reusing trusted_scope_dir when available or loading
the fetched module via importlib. Preserve the existing evidence validation
behavior while preventing PR changes to the enforcement module from weakening
it.

---

Nitpick comments:
In `@scripts/check_chunk_contract.py`:
- Around line 323-327: Harden the shared _git runner by supplying the configured
subprocess timeout and converting subprocess.TimeoutExpired into ContractError
so callers retain the stable failure surface. Ensure ref-derived Git arguments
are protected with explicit -- separators or conservative validation, including
rev-parse and ls-tree paths, while keeping the fixed argv execution unchanged.

In `@scripts/test_agent_gates.py`:
- Around line 6499-6533: Update
test_machine_chunk_scope_gate_is_mandatory_and_signed_state_bound to parse the
workflow YAML and locate the trusted-materialization loop step, then assert the
required script names, git show command, trusted_checker invocation, PYTHONPATH,
and copy command within that step’s content instead of searching the entire
workflow text. Follow the exact-step matching approach used by the neighboring
test.

In `@scripts/test_check_chunk_contract.py`:
- Around line 191-277: The second select_contract call after the initial
mock.patch.object scope relies on real verify_state_ref execution to produce the
authentication failure. Add a concise comment immediately before that call
explicitly stating that verification is intentionally unpatched and must fail
with “authentication failed”; leave the existing call and assertions unchanged.
- Around line 418-423: Update
test_untracked_case_collision_with_unchanged_head_is_rejected and the related
invalid-UTF-8 filename test to detect whether the filesystem supports the
required case collision and byte-name representation before creating fixtures.
Skip each test when its filesystem capability is unavailable, while preserving
the existing assertions on filesystems that support the scenarios.
- Around line 278-334: Rename test_rejects_stopped_projection_and_blob_mutation
to reflect that it only verifies signed_contract_blob path/blob mutation
rejection. In
test_grandfather_requires_active_exact_cutover_parent_and_prestart, remove the
unused temporary repository setup and related git/file operations, keeping the
in-memory records and require_grandfather assertions intact.
- Around line 336-377: Replace the pre-constructed common patcher tuple in
test_select_rejects_stopped_and_post_cutover_no_schema_starts with
contextlib.ExitStack, entering the shared added_merge_intent and
verify_state_ref patches through the stack for the first assertion. Keep the
test’s existing behavior and separate second assertion setup unchanged.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 723b3213-708a-4fa7-88c3-4a5a80d9f7cd

📥 Commits

Reviewing files that changed from the base of the PR and between bd2203d and 55dcad6.

📒 Files selected for processing (24)
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/STATUS.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-01-machine-checkable-chunk-scope.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-02-scheduled-signed-state-drift-audit.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-03-risk-routed-adversarial-proof.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-04-loop-memory-property-invariants.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-05-authorization-property-invariants.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-06-changed-module-mutation-pilot.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/chunks/WS-ENG-008-07-lossless-review-memory-index.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-internal-review-evidence.md
  • .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/reviews/WS-ENG-008-01-pr-trust-bundle.md
  • .agent-loop/merge-intents/WS-ENG-008-01.json
  • .agent-loop/policies/definition-of-done.md
  • .agent-loop/policies/repository-engineering-policy.md
  • .agent-loop/templates/CHUNK_CONTRACT.md
  • .github/workflows/agent-gates.yml
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
  • docs/architecture_lockdown.md
  • docs/glossary.md
  • scripts/check_chunk_contract.py
  • scripts/check_internal_review_evidence.py
  • scripts/test_agent_gates.py
  • scripts/test_check_chunk_contract.py

Comment thread .agent-loop/initiatives/WS-ENG-008-repository-native-sdlc-assurance/STATUS.md Outdated
Comment thread .agent-loop/templates/CHUNK_CONTRACT.md Outdated
Comment thread .agent-loop/templates/CHUNK_CONTRACT.md
Comment thread .github/workflows/agent-gates.yml
Comment thread scripts/check_chunk_contract.py
Comment thread scripts/check_chunk_contract.py
Comment thread scripts/check_internal_review_evidence.py
@abiorh-claw
abiorh-claw self-requested a review July 26, 2026 09:06
@abiorh-claw
abiorh-claw merged commit 339248c into main Jul 26, 2026
3 checks passed
github-actions Bot pushed a commit that referenced this pull request Jul 26, 2026
@abiorh-claw
abiorh-claw deleted the codex/ws-eng-008-01-machine-checkable-scope branch July 26, 2026 20:15
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.

2 participants