Repository navigation
Conversation
[Medium impact] The reviewed changes appear safe to merge. SummaryAdds reasoned retirement of generated obligations without treating retirement as completed proof, plus advisory notices for artifacts with many static-only candidates.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Admitted Evidence bundle"] --> B["Request-local capture cache"]
B --> C["Generate process candidates"]
B --> D["Check review Evidence"]
C --> E["Merge reviewed dispositions"]
D --> E
E --> F["Check supplied proof and required open work"]
F --> G["Ledger with advisory flood notices"]
Reviews (11) · Last reviewed commit: "perf(obligations): parse each capture on..." · Reviewed by Greptile |
A generated obligation could be closed by adding a reviewed record that named the same id and retired it, so an agent could clear a decoy flood by asserting every claim out of scope and reach a ready ledger with no proof. Reviewing a generated claim also silently cleared its required flag. Keep the generated definition's required value when a reviewed record retires it, so a retired required obligation stays open work. Exclude nothing from the over-generation count: a retired claim still counts, and the limitation now reports how many are still unreviewed against how many were retired, so the signal survives review. Require a non-blank disposition_reason for the two retiring dispositions and add not-applicable, which mirrors the existing out-of-scope diagnostic, so a retirement always states why. A fully retired artifact never reaches ready and stays flagged until runtime authority or a manifest binding exists.
6374f08 to
94a39a7
Compare
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94a39a7d0e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecff95e2f0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
A retired generated claim skipped its binding evaluation, so a supplied fixture or verifier proof that failed was hidden. Run the binding check for retired claims and keep only the proof failures (fixture-failed, verifier-failed, contradiction); diagnostics that would demand more fixtures, a verifier, or authority are still dropped, so a retired claim demands no work. A retiring review that cited observed process or service Evidence recomputed the generated claim's source_state to observed, which removed it from the over-generation count. Keep the generated source_state when a review retires a claim; the review Evidence is still attached. A second retiring record for one generated ID overwrote the first review, and a record for another obligation_version retired a claim it did not name. Both are now competing definitions reported as duplicate-definition. Reviewed records merge in a canonical order so the result does not depend on input order. Static-authority families (native exports, addons, P/Invoke) are satisfied without runtime authority, so exclude them from the over-generation group instead of telling the agent to obtain runtime authority for them.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddf8dc75ae
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
A retired generated claim reports status out-of-scope ahead of contradicted, so an authenticated contradiction it still carried left the ledger open instead of failed. The ledger status predicate now treats a contradiction diagnostic as failing, like fixture-failed and verifier-failed; the schema refinement reuses the same predicate. Also compute each reviewed record's canonical order key once before sorting instead of digesting both records on every comparison.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e692412f3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Only the first retiring review of a generated claim kept its source state. A later review, a second retiring record or an active one, recomputed source_state from every reference, so an observed process capture cited as review Evidence made a retired decoy look observed. It then dropped out of the over-generation count, and the ledger could report open with complete coverage while the decoy flood was hidden. Every reviewed record merged into a generated claim now keeps the generated source state while its review references are still attached. Duplicate-definition reporting is unchanged. Also pin and document that a blocked reviewed claim with an authenticated contradiction fails the ledger, and document that a contradiction on a retired claim fails it too.
|
@BaaRai thanks for the PR — there are 4 open review threads here:
Could you address or reply to these? Once they're resolved and CI is green we can take another look. |
|
@BaaRai also, this branch has merge conflicts with |
…sition # Conflicts: # src/application/ReconstructionObligationLedgerEvaluation.ts
A complete graph with more than the threshold of unbound candidates flipped coverage to partial and the ledger to unknown although nothing was truncated. The obligation-overgeneration limitation stays listed but no longer changes coverage.status or the ledger status; retired claims stay required, so a fully retired artifact still cannot reach ready.
Grouping unbound candidates copied each artifact bucket per insertion, which is quadratic in the candidate count of one artifact. Append to the existing bucket instead and cover a 5000-candidate artifact.
Retiring every claim while citing one observed process capture of another artifact must not shrink the over-generation count, drop a limitation, or improve coverage or status. The generated source state already ignores review provenance; this pins it.
A retired claim already keeps supplied fixture and verifier failures (RETIRED_PROOF_FAILURES) while dropping requests for missing proof. Pin the verifier path next to the existing fixture case: a failing verifier fails the ledger, a passing one leaves it open.
Two retiring reviews for one ID applied only the canonical first; the other review's reason was dropped behind a generic duplicate-definition diagnostic. Each retiring record that is not applied now adds a duplicate-definition diagnostic carrying its disposition and reason, so the output names every reason independent of input order.
Over-generation is computed once from the obligations as a per-artifact value (total, retired, unreviewed, families). The limitation text is rendered from it, evaluation passes only closure limitations to coverage and status, and the schema check removes the advisory text it re-derives from the obligations instead of matching a limitation prefix. Output and contract are unchanged; a test pins the rendered text.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…the artifact - Record limitation_kinds beside limitations so coverage and status read a structured kind, never the advisory sentence. The field is optional: a ledger retained without it derives its kinds from its obligations. - Count over-generation in one pass with a fold that updates each artifact's tally in place. - Mark observed runtime Evidence cited by a review as other-artifact when it does not observe the obligation's target artifact; it no longer clears static-only or counts in by_evidence_authority. - Read unknown diagnostics for ledger status so retirement never improves it, and apply no retirement to a contested definition, matching the other duplicate paths in either order. - Assert facts and formatter output instead of full sentences, and drop the fixed decoy-flood test deadline.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…aims - Read residual-unknown, unavailable-authority and duplicate-definition diagnostics for ledger status only on retired (out-of-scope) claims, so retirement still never turns unknown into open while active and blocked claims keep the status rule main uses. A blocked claim with unknown residue stored open parses again. - Accept the status rule a ledger was written under when it has no limitation_kinds, so ledgers retained from main with a retired claim carrying unknown residue keep parsing; ledgers with kinds are read by the current rule only. - Mark a non-process controlled-replay record cited by a review as other-artifact when it does not observe the obligation's artifact, so summary.by_evidence_authority stops counting it.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Review authority and the observed artifact now read one per-request parse of each capture, keyed by Evidence ID, instead of parsing the same payload twice per citing review.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
All threads are resolved, CI is green on 09fe166, and the PR is CLEAN. Since your review:
One behaviour worth your eye: a fully retired artifact never reads ready by design, until runtime authority or a manifest binding exists. That is in the reference doc. Ready for your merge call. |
Summary
Reconstruction obligation ledgers could be closed without proof. A reviewed
reviewed_obligationsrecord that named a generated obligation and retired itcleared that obligation's
requiredflag, so an agent facing a flood ofgenerated candidates could mark every one
out-of-scopeand reach areadyledger with no runtime authority, fixture, or verifier. This PR makes a
reviewed retirement an explicit, reasoned review of the generated claim that
never closes the ledger on its own, and adds an artifact-level
obligation-overgenerationlimitation so a static-only candidate flood isreported instead of silently demanding fixture work.
No issue is linked. The problem was found while exercising the ledger builder
with the BLA red-team harness (https://github.com/qybaihe/bla), which
produces Electron-style artifacts whose preload scripts expose many
context-bridge boundaries in unreachable code; the ledger generated an
obligation for each one and accepted blanket retirement as closure. The
findings are summarized here rather than in a separate issue; I can open one
if maintainers prefer tracking it that way.
Draft: not ready for review until the Linux CI lane is green.
Problem and expected behavior
Trigger: build a ledger for an artifact whose Application Graph yields many
generated obligations with no runtime authority, then supply reviewed records
that name those generated IDs with
disposition: "out-of-scope".Violated invariants on the base revision:
(
duplicate-definition) instead of reviewing it, and its ownrequiredvalue replaced the generated one, so
required: falseretired the claimfrom
required_open.out-of-scopeneeded no reason.status: "ready"with zero proof:self-certification.
fixtures and a verifier per decoy.
Expected: a retirement states its reason, keeps the generated definition
(including
required), and a ledger reachesreadyonly through runtimeauthority or manifest bindings for the artifact, never through retirement.
Change and scope
reviewed_obligationsrecord whosedispositionisout-of-scopeor thenew
not-applicablemust carry a non-blankdisposition_reason; it isrejected as caller input otherwise. This is a caller-input change only:
the retained ledger output and stored Evidence use the separate
ReconstructionObligationschema and are unaffected.not-applicabledisposition. Added as an intentional second retiringdisposition beyond the original ask, with a matching
not-applicablediagnostic code that mirrors the existing
out-of-scopediagnostic, so areviewer can distinguish "outside this reconstruction's scope" from "this
boundary cannot be reached".
ready. When a reviewed record retiresa generated obligation, the generated definition is kept and only the
disposition and reason are overlaid (
addCandidateinsrc/application/ReconstructionObligationCandidates.ts). A retiredrequired obligation still counts toward
required_open. A fully retiredartifact stays flagged by the over-generation limitation until runtime
authority or manifest bindings exist for it. This is the intended defence
against self-certification.
unknown(
reconstructionObligationLedgerStatus), so an over-generated ledger readsunknowneven when every obligation is retired. That is the fail-closedchoice; the design discussion may revisit whether a fully reviewed
over-generated artifact should read
openinstead.obligation-overgenerationlimitation. When more thanOBLIGATION_OVERGENERATION_THRESHOLD(20) generated obligations in oneartifact have neither runtime authority nor a manifest binding, the ledger
adds one limitation for that artifact naming the count, families, and how
many are still unreviewed versus retired. Every candidate is still emitted;
nothing is dropped or capped. The threshold is a documented constant in
src/application/ReconstructionObligationLedgerEvaluation.tsand may needtuning against real applications.
Not included: no change to manifest bindings, proof evaluation, closure
digests, or the MCP tool surface; no new runtime setting for the threshold.
Contract and boundary impact
src/domain/reconstructionObligationLedgerSchemas.tsparses the reviewedrecord (now a discriminated union on
disposition);src/application/ReconstructionObligationCandidates.tsmerges a retiringreviewed record into the generated candidate;
src/application/ReconstructionObligationLedgerEvaluation.tsemits thenot-applicablediagnostic and the over-generation limitation. Nosuperseded path removed.
change within existing boundaries; no target execution, injection,
mutation, or protection recovery. Scope decision: not applicable (pending
maintainer confirmation while draft).
build_reconstruction_obligation_ledgerinput tightens (
disposition_reasonrequired for retiring dispositions;not-applicableaccepted). Output schema gains thenot-applicablediagnostic code and the
obligation-overgeneration:limitation text.MCP boundary tests pass (see validation).
disposition_reasonis required for the retiring dispositions inreconstructionObligationLedgerInputSchema; retained ledger Evidence still parses because the output obligations use a separate schema.ReconstructionObligationrecords and stored Evidence are unchanged inshape;
disposition_reasonis carried into theout-of-scope/not-applicablediagnostic detail.applicable.
npm run docs:checkpasses on this branch; no committed generated outputs.
Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
caller-supplied Evidence bundle and manifest)
Evidence and regression coverage
src/application/ReconstructionObligationLedger.disposition.test.ts(new, 9 tests): retires a generated obligation without competing with it
(without a binding, and with a fixtureless binding); keeps a required
out-of-scopereviewed obligation required and the ledgeropen; doesnot hide sibling obligations or their closure work; rejects a retiring
disposition with an empty, blank, or missing reason; rejects a reason on
a disposition that does not retire; still reports an active reviewed
definition that reuses a generated ID.
src/application/ReconstructionObligationCandidates.test.ts(updated):reports one artifact-level limitation only above the threshold and keeps
every candidate; keeps the limitation when reviewed dispositions retire
the surplus and reports the unreviewed count; does not reach
readywhenthe real bridge and every decoy bridge are retired.
tests/boundary/javascript/reconstructionObligationDecoyFlood.test.ts(new, 1 test): end-to-end decoy flood through the JavaScript boundary;
the real context-bridge obligation survives while decoys are flagged.
the base. On the base revision
addCandidatekept the first definition andreported a second one as
duplicate-definition, a reviewed record's ownrequired: falsegoverned whether its claim counted as open work, and thereviewed schema accepted
out-of-scopewith no reason, so the newdisposition tests would not pass there.
obligation-overgeneration: artifact <sha256> has 24 generated obligations with no runtime authority and no manifest binding (families: context-bridge), above the threshold of 20; 3 still unreviewed, 21 retired by reviewed disposition. Stop: do not write fixtures or verifiers for these candidates; ...locally (see validation); the threshold of 20 is not yet calibrated against
a large real application.
For evidence-bearing changes:
Validation performed
All on Windows 10 with Node v24.22.1 (the pinned version), on the rebased
head
94a39a7d0e5310ad00b3a75bf7b0af4ff3d01228(rebased ontoorigin/mainat
887b99888e54122accdc721737e5cafe39838f5f, no conflicts).npm run test:focused -- src/application/ReconstructionObligationCandidates.test.ts src/application/ReconstructionObligationLedger.disposition.test.ts src/application/ReconstructionObligationCandidates.semantic.test.ts src/application/ReconstructionObligationLedger.closure.test.ts src/application/ReconstructionObligationLedger.authority.test.ts— 5 files, 59/59 passed, exit 0npm run typecheck— exit 0npx oxfmt --check .— all 7219 files formatted, exit 0npm run lint— 0 errors, 3347 warnings (pre-existing), module boundaries checked (3841 files), exit 0node node_modules/vitest/vitest.mjs run --project mcp-boundary tests/boundary/mcp/reconstructionObligationLedgerMcp.test.ts tests/boundary/mcp/compactInputSchemaMcp.test.ts— 2 files, 49/49 passed, exit 0npm run docs:check— README consistency 9/9 passed, exit 0tests/boundary/javascript/reconstructionObligationDecoyFlood.test.ts.The Windows native path fails on this host (Win32 error 87), which is
pre-existing on the base commit and unrelated to this change. The test runs
on the Linux boundary shard in CI; its result is unverified until that
shard reports.
Compatibility, safety, and release
reviewed record
{ "disposition": "out-of-scope", ... }without adisposition_reasonis now rejected; add a non-blankdisposition_reasonstating why the claim is retired. Retained ledgers and stored Evidence do
not change shape and need no migration. Compatibility cannot be preserved
without keeping reason-less retirement, which is the self-certification
path this PR closes.
change).
docs:checkpasses.interaction. The change narrows what caller input can assert about
closure.
Author readiness
Human owner: @BaaRai
Before merge
type(scope): outcome.