Skip to content

Topology-first enforcement reset (021) + runner reason-code/coverage fix (022) - #4

Merged
E-G-C merged 2 commits into
mainfrom
e-g-c-issue-3-add-a-topology-first-reset-when-review-r-891391
Aug 6, 2026
Merged

Topology-first enforcement reset (021) + runner reason-code/coverage fix (022)#4
E-G-C merged 2 commits into
mainfrom
e-g-c-issue-3-add-a-topology-first-reset-when-review-r-891391

Conversation

@E-G-C

@E-G-C E-G-C commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Why

Repeated review cycles can grow a design by accumulating gates, checkpoints, and cross-session state around an assumed enforcement point that no revision rechecks. Issue #3 asks for a topology-first reset that forces the planning authority to re-establish where production behavior is actually controlled before expanding enforcement further.

This PR delivers that reset as workflow guidance (Feature 021), and, dogfooding the very discipline it adds, applies a topology retrace to a small real runtime attribution bug it surfaced (Feature 022).

Feature 021: topology-first reset (guidance, no new artifact)

Woven into the two existing review-loop skills, so it creates no new skill, agent, state, or board:

  • dude-receiving-code-review gains the three reset triggers (a control-boundary concern surviving two review cycles; a revision adding a new gate/store/checkpoint/cross-session state; enforcement expanding across modules or workflow boundaries) and requires the planning authority's six-part topology check before the next revision. Evidence that a mechanism covers an otherwise-uncovered reachable path lets the revision proceed; it is a gate on evidence, not an automatic veto. Ordinary local fixes stay exempt.
  • dude-reviewer-protocol requires the verdict to judge the revised design against that evidence, verify claims against current source and call sites, and admit new machinery only with a demonstrated reachable failure plus a covering acceptance test.

Two T021 static contract pins lock the prose; .github/ projections are regenerated from src/.

Feature 022: runner reason-code and coverage fix

Retracing the real call graph runHostAdapter -> exchange -> orphan -> finish (the single terminal "safety writer") exposed two narrow defects at the untrusted host boundary:

  • An untrusted host exchange callback could throw an error whose arbitrary error.code became the runner's terminal halt reason. It is now restricted to a frozen runner-owned allow-list (supervisor-context-lost, challenge-response-invalid, exchange-context-lost); any other code falls back to the runner-owned default. Legitimate codes still pass through.
  • The orphan fallback row omitted the target it orphaned. target is now added to both orphan() branches. It is a row field only, so the evidence-derived haltReport is unchanged and Feature 013's contract holds.

Coverage: a regression test proving an arbitrary error.code cannot leak, and an integration test driven through the real finish() writer asserting a runner-owned reason plus the orphaned target. The production path was reachable, so these are genuine tests rather than a fabricated fixture.

Notes for reviewers

  • Both changes are additive. Full suite green (2265 pass / 0 fail, 4 pre-existing environment skips), dude-lint 0 warnings / 0 failures, src/ and .github/ projections byte-identical.
  • The runner fix intentionally adds target only to orphan fallbacks, not the runner-refused pre-binding terminal (target may be unbound there). Each new contract pin and each new test was mutation-tested (revert the change, confirm the guard fails).
  • A related but out-of-scope concern (the runner attribution/coverage work) was split into its own idea before Feature 022 defined it, per the issue's Non-Goals.

Fixes: #3

E-G-C added 2 commits August 6, 2026 17:26
Weave a topology-first reset into the existing review-loop skills (no new
persistent artifact):

- dude-receiving-code-review: name the three reset triggers and require the
  planning authority's six-part topology check before the next revision, with
  the evidence-backed-proceed rule and the ordinary-local-fix exemption.
- dude-reviewer-protocol: require the verdict to judge the revised design
  against the topology evidence, verify claims against current source/call
  sites, and admit new machinery only with a reachable failure and a test.

Pinned by two T021 static contract tests; .github projections regenerated.
Full suite green, lint 0/0, additive-only.

Also splits the out-of-scope runner reason-code/coverage fix into its own
draft idea ledger (runner-reason-code-coverage-fix) per issue Non-Goals.

Closes #3
The unattended runner owns its stop and attribution, but two defects broke
that at the host-exchange boundary:

- An untrusted host `exchange` callback could throw an error whose arbitrary
  `error.code` became the runner's terminal halt reason. Restrict it to a
  frozen runner-owned allow-list {supervisor-context-lost,
  challenge-response-invalid, exchange-context-lost}; any other code falls back
  to the runner-owned default.
- The orphan fallback row omitted the target it orphaned. Add target to both
  orphan() branches (row field only; the evidence-derived haltReport is
  unchanged, so Feature 013 T006 A still holds).

Add a regression test (arbitrary error.code cannot leak) and an integration
test driven through the real finish() terminal writer (runner-owned reason +
orphaned target). Full suite green, lint 0/0, additive.
@E-G-C
E-G-C merged commit 38953f7 into main Aug 6, 2026
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.

Add a topology-first reset when review revisions expand enforcement scope

1 participant