Skip to content

[PG-01/RG-01] Share reviewed KB reports with native agents - #10

Merged
FlyOverCoderKY merged 5 commits into
mainfrom
claude/kb-evidence-reports
Nov 8, 2026
Merged

FlyOverCoderKY merged 5 commits into
mainfrom
claude/kb-evidence-reports

Conversation

@FlyOverCoderKY

@FlyOverCoderKY FlyOverCoderKY commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Local agents need to submit test reports and check staff review through their existing MCP connection. Add a shared evidence-report service and an optional report workflow on the existing five agent tools. A queued acknowledgement becomes usable evidence only after authorized human confirmation and the KB's normal evidence checks. The three delegated scopes remain unchanged.

The service binds receipts to content, governance, evidence and current authority. It supports exact historical acknowledgement recovery, staff reassessment and bounded ledger retention. Exact accepted-fact revocation preserves the refusal of an original revoked receipt while allowing a separately reviewed replacement. Human qualification requires authoritative current evidence history. MCP validates the concrete result variant and makes a finite final status observation after its other awaited fences.

New report admission rejects evidence syntax that Core cannot accept, including padded steps, invalid language tags and duplicate artifact IDs. It rejects rather than normalizes. A captured pre-guard implementation supplies real pending/confirmed ledger fixtures: their exact historical acknowledgements remain recoverable, while malformed evidence cannot qualify. This is an unpublished-source compatibility fixture, not migration or live-host proof.

Portable keys and bounded string chunks support Memory, Azure Tables and D1. Explicit raw layout preserves the retained R1 epoch ledger; nonempty history without its head is refused before mutation. No automatic migration is added. Admission/deletion bounds and underlying full-partition integrity reads are documented separately.

Local validation of the final fix:

  • All 15 targeted real-store cases passed: 12 new syntax/retained-report cases plus the three existing capacity checks. The other 174 report-service cases were intentionally unselected in that targeted run.
  • All 47 HTTP/official-MCP cases passed.
  • All 128 Node release cases were considered: 125 passed and three Windows file-symlink cases skipped. Both Linux Node 22/24 CI lanes must execute the full repository suite and all release cases before merge.
  • Formatting, types, synthetic example, isolated four-package consumers and the packed authenticated protocol proof passed.
  • Independent reviews bind the final source, exact retained capture data, public boundaries and stated compatibility limits.

Fresh current-head full CI and complete two-lane full-PR review are required. This is the synchronized 0.1.3 source candidate; verified publication is required before host adoption. Actual site logins, the four target client applications, deployed ingress and supervised pilots remain separate acceptance gates. Synthetic proofs claim none of them.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

OpenRouter review posted (clean). #10 (review)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T22:34:18.449791Z 487cab3 Manual request
🔒 Security Review ✅ Completed 2026-11-08T22:36:52.953257Z 487cab3 Manual request

Security findings

Advisory findings (1)

ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

@codex review

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: e77d791848

ℹ️ 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".

@github-actions github-actions 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.

OpenRouter pull-request review

Verdict: issues
Scope: full-pr (full-pr)
Mode: initial
Commit: e77d791848054095aca5f76f6a0faba1dcfe1099
Judge: openai/gpt-5.6-luna
Cost: $0.5550 (lanes $0.5490 + judge $0.0060)

Lanes

  • openai/gpt-6.1-sol: ok (8 finding(s), 138.8s, 607080+6767 tokens (503890 cached), 6 tool round(s), via Azure, $0.41)
  • z-ai/glm-5.3-flash: ok (4 finding(s), 257.1s, 2863868+50800 tokens (2663552 cached), 28 tool round(s), via Crusoe, $0.14)

Findings

🔴 Issue 1 — Insufficient documented reviewer permissions

packages/application/src/evidence-reports.ts:702 · bug · identified by openai/gpt-6.1-sol

A reviewer granted exactly the documented staff permissions—confirmationPermission, draftRead, and evidenceRead—can list reports but cannot read or decide them using the prescribed public-application composition. Their confirmations also cannot qualify evidence through the verifier.

staff() accepts that permission set, but context() calls the host's readContext, which the guide requires to use getValidationRequirements. That application method additionally requires draftWrite or evidenceSubmit. The verifier likewise reads requirements through the resolved reviewer context.

I checked packages/application/src/reads.ts, the composition guide, and both report fixtures. The fixtures grant reviewers both additional permissions, masking this least-privilege failure. Align the public staff-authority contract and implementation, and test a reviewer with only the advertised minimum.

🔴 Issue 2 — Unrecoverable historical report acknowledgement

packages/mcp/src/dispatcher.ts:347 · bug · identified by openai/gpt-6.1-sol

An agent whose report committed but whose response was lost cannot recover its acknowledgement once another article mutation advances the generation—even if that mutation only attaches evidence and leaves the content revision unchanged. Retrying the exact original report command returns conflict indefinitely.

The dispatcher checks target.generation !== input.expectedGeneration before calling reports.report, so the ledger's historical replay path is never reached. This also affects the documented case where a post-report article fence withholds an acknowledgement after the report was queued.

I checked the ledger's replay implementation, the direct-service lost-acknowledgement test, and tests/agent-reports.test.ts. The direct service supports recovery, but the transport tests do not exercise exact report replay after an article-generation change. Admission fencing must distinguish new work from an already accepted exact retry.

🟠 Issue 3 — Unbound report command generation

packages/mcp/src/dispatcher.ts:349 · risk · identified by openai/gpt-6.1-sol

After a report is accepted at generation 1, an agent can reuse its command ID and evidence at generation 2, changing only expectedGeneration, and receive the original acknowledgement rather than a command-identity conflict. The changed generation passes the dispatcher gate but is absent from the retained command fingerprint.

The dispatcher drops expectedGeneration when forwarding to reports.report. The report service consequently binds actor, article, epoch, evidence, and report text, but not this advertised semantic command field. In contrast, normal application mutation fingerprints include expectedGeneration.

I checked articles.ts, the report fingerprint, and the replay tests in both new suites. Correlation IDs are also omitted by the existing application fingerprint, so this finding concerns only the generation fence. Add transport-level command binding or extend the service contract so a changed expected generation cannot masquerade as an exact retry.

🔴 Issue 4 — Permanent revocation of an evidence identifier

packages/application/src/evidence-reports.ts:816 · bug · identified by openai/gpt-6.1-sol

Once staff revoke one accepted evidence version, a fresh test report using the same evidence ID and article revision can never be confirmed or qualified, regardless of its new execution, artifacts, receipt, or human review. Recovery requires inventing another evidence ID or editing the article.

valid() rejects any revocation matching only id and articleRevision. The existing KB revocation contract identifies a specific immutable version and hash; core evidence replacement advances the version, and publication checks compare the exact revoked version/hash. The report service broadens that revocation into an identifier-wide ban.

I checked EvidenceRevocation, recordEvidence, rejectRevokedCurrentEvidence, and the application revocation tests. The new report suite contains no fresh-report replacement case after evidence revocation. Preserve refusal of revoked proof without blocking independently reviewed replacement proof under the normal versioned evidence contract.

🟠 Issue 5 — Missing post-write principal-authority checks

packages/application/src/evidence-reports.ts:975 · risk · identified by openai/gpt-6.1-sol

If a principal loses the required permission while a report transaction is awaiting storage, the factory still returns a successful acknowledgement after that transaction completes. The same gap affects human decisions and reset/drain responses.

The write paths check current authority before records.transact, but do not resolve it afterward:

  • write() returns after an epoch check, covering report submission, decisions, and its competing-command replay path.
  • reset() returns the new ledger state directly after its transaction.
  • drain() does the same after deleting rows.

I checked the read/replay methods, which do perform later current-principal checks, and the new revocation tests, which cover private reads and verification rather than revocation during mutation storage awaits. Host grant wrappers can mitigate this, but direct factory consumers still have the gap. Recheck authority before acknowledging completed writes; a refusal must not imply rollback.

🟠 Issue 6 — Silent fallback from invalid report results

packages/mcp/src/schemas.ts:322 · risk · identified by openai/gpt-6.1-sol

When a configured report port returns malformed ledger or status metadata, report-aware requirements polling can succeed as a legacy requirements response, silently omitting reportLedger and reportStatus. A client expecting the advertised report workflow receives neither usable metadata nor an unavailable error.

The first output-union branch validates report fields, but the fallback legacy schema strips unknown fields. For example, an invalid ledger status or report-status value fails the extended branch and then passes the legacy branch after all report fields are removed.

I checked the dispatcher result construction and the optional-port wrapper tests. The shared factory normally returns valid metadata, but this public trusted composition seam already validates runtime results, and no malformed report-result test prevents the fallback. Select the output schema according to the input variant, or reject extended fields before allowing the legacy branch.

🔵 Issue 7 — Contradictory current-release documentation

README.md:23 · nit · identified by openai/gpt-6.1-sol

A maintainer following the README's linked composition, storage, retrieval, or test guides is still told that 0.1.2 is unpublished candidate source and that the current verified release is 0.1.1, contradicting this PR's new 0.1.2 receipt and synchronized 0.1.3 manifests.

The remaining current-status statements occur in:

  • docs/HOST_COMPOSITION.md:13–16.
  • docs/COLLECTIONS.md:15–17.
  • docs/RETRIEVAL.md:10–15.
  • docs/SOURCE_PREPARATION.md:53–55 and its closing candidate-status paragraph.
  • test/README.md:25 and 93–95.
  • examples/composition/README.md:24–26.

I searched repository-wide for candidate/version statements and read these sections. Historical records should remain historical, but these present-tense status claims and generic release links need synchronization so readers can distinguish verified dependencies from the new candidate.

🔵 Issue 8 — Incorrect advertised receipt byte bound

docs/AGENT_API.md:137 · nit · identified by openai/gpt-6.1-sol

A host report port returning an opaque receipt containing exactly 512 ASCII characters satisfies the documented 512-UTF-8-byte bound, but the transport rejects it because its JSON string representation occupies 514 bytes. Receipts containing quotes or backslashes reach the effective limit even earlier.

reportAcknowledgement measures JSON.stringify(value), whereas the wire guide states a bound on the receipt's UTF-8 bytes. The schema comment explicitly describes a JSON-encoded bound, so the documentation and implementation describe different contracts.

I checked the schema and minimum-response-budget test. The shared factory's compact receipts do not reach this boundary, but the optional port's public types permit host-defined strings. Document the JSON-encoded bound consistently, or enforce the stated raw UTF-8 bound while reserving sufficient framing space.

🟠 Issue 9 — Six un-edited docs still declare 0.1.2 an unpublished candidate, contradicting this PR's verified-0.1.2/candidate-0.1.3 flip

docs/HOST_COMPOSITION.md:15 · risk · identified by z-ai/glm-5.3-flash

A maintainer or host integrator reading these files will conclude the opposite of this PR's central release-state claim: they say the four-package 0.1.1 trusted release is the latest verified one and that "Source 0.1.2 ... its own review, current-head gates, trusted release, and strict verification remain open", while README.md, AGENTS.md, docs/BOOTSTRAP.md, docs/RELEASING.md, docs/AGENT_API.md, and docs/AGENT_WORKFLOW.md in this same PR now assert that all four 0.1.2 packages completed verified trusted publication at 2026-11-08T03:39:55Z and that 0.1.3 is the pending candidate.

Affected spots, all left untouched by this diff:

  • docs/HOST_COMPOSITION.md:14-16 — "The four-package 0.1.1 trusted release is now verified ... Source 0.1.2 is the atomic draft/source candidate; its own review ... remain open."
  • docs/RETRIEVAL.md:11-13 — "All four 0.1.1 packages have since completed verified trusted publication ... Source 0.1.2 remains a candidate."
  • docs/SOURCE_PREPARATION.md:53-55 and docs/SOURCE_PREPARATION.md:301-302 — "Source 0.1.2 is now the SD-03 atomic draft/source candidate ... still required" / "Source 0.1.2 retains its own review, current-head ...".
  • docs/COLLECTIONS.md:15-17 — "The [verified 0.1.1 release] is complete; the 0.1.2 source candidate ... retain their own gates."
  • test/README.md:92-94 — "The four-package KB 0.1.1 trusted release is now verified. Source 0.1.2 remains a candidate ..."
  • examples/composition/README.md:24-26 — "the four-package 0.1.1 trusted release is now verified. Source 0.1.2 remains a candidate ..."

Several of these also link BOOTSTRAP.md#verified-knowledge-base-release as the receipt for the 0.1.1 release, but that anchor now documents the 0.1.2 receipt, so the link text and target disagree too. The failure scenario is concrete: a host team gating adoption on "wait for the verified 0.1.2 release" reads HOST_COMPOSITION.md and delays or mis-versions adoption, or cites the stale lines in a review to dispute that 0.1.2 is published.

I checked whether these lines were intentionally left as historical narrative: none of the six files is in the diff, none carries a date qualifier like the reworded BOOTSTRAP.md history sections do, and each uses the present-tense "remains a candidate" phrasing that this PR rewrote everywhere else.

🟠 Issue 10 — Polled reportStatus/status result is not fenced against a concurrent staff decision, so the agent can receive a stale receipt/status

packages/mcp/src/dispatcher.ts:296 · risk · identified by z-ai/glm-5.3-flash

An agent polls getValidationRequirements with reportLookup; a staff decide (confirm or reassess) commits between the dispatcher's reports.status(...) await and the final fence reads. The dispatcher then returns reportStatus.status: "confirmed" bound to the pre-decision receipt even though the report was just reassessed and its receipt cycle rotated; the agent, following docs/AGENT_WORKFLOW.md step 5 ("poll for its current receipt"), submits that rotated-away receipt and gets a prerequisite refusal — or, on the confirm-in-window case, keeps polling on a stale pending.

Mechanism: the dispatcher fences everything else after the awaits — draft generation (latest.generation !== target.generation), requirements (JSON.stringify compare), and ledger epoch/status (latestLedger...) — but a decide writes only the report row, command row, and audit row; it never touches the ledger head, so every one of those fences passes while reportStatus is stale. The service's own status() has the same gap: after load it rechecks only the principal (current) and the ledger (active), never re-reading the report row, unlike read/decide/verifier.verify, which all re-load before returning.

Consequence is bounded (the verifier's receiptGeneration check refuses the stale receipt, so no unsafe acceptance), but the documented contract — "Supplying reportLookup also returns the submitting owner's ... reportStatus" as the way to "poll for its current receipt" — is violated in exactly the reassessment scenario the docs call out, causing refused submissions and wasted cycles until the next poll.

I checked the counterpart test: tests/agent-reports.test.ts fences a draft edit during the status await ("withholds old report status after an actual draft edit during the status await"), which shows the fence intent, but no test or code path fences a decision landing in that window; decide provably leaves head.version unchanged, so ledger_changed/ledger_epoch_changed cannot catch it either.

🟠 Issue 11 — Documented uncertain-report recovery is unreachable once the article changed: the dispatcher's generation pre-check blocks the service's replay, stranding a queued report and its only reportId

packages/mcp/src/dispatcher.ts:348 · risk · identified by z-ai/glm-5.3-flash

An agent's submitEvidence report call commits in the ledger but the response is lost (the dispatcher's own post-write draft check then throws conflict, or the transport drops the response). docs/AGENT_API.md instructs: "Retry an uncertain report command with the same ID and exact input under fresh authority." That retry works only while the article is unchanged — and in exactly the case where the article did change, the dispatcher's pre-check if (target.generation !== input.expectedGeneration) throw ... conflict (packages/mcp/src/dispatcher.ts:348) aborts before reports.report is ever invoked, so the service's fingerprint replay (which would return the historical acknowledgement for the identical command) never runs.

The stranded report is then unreachable from the agent surface: both recovery paths require the reportId, which the agent only learns from the acknowledgement it never received — status takes {articleId, ledgerEpoch, reportId} and the requirements poll takes reportLookup: {ledgerEpoch, reportId}. There is no agent listing. Meanwhile the pending report permanently consumes one of the 16 admission slots (and 3 of 160 rows) for that article until staff run reset/drain, and repeated lost-ACK-plus-edit incidents can fill the ledger with reports the agent can neither complete nor poll.

The docs partially acknowledge the window ("conflict or unavailability does not prove rollback") but the very next sentence prescribes a retry procedure the transport refuses in this state, and docs/EVIDENCE_REPORTS.md presents status/polling as the recovery for reassessment without noting that a lost acknowledgement leaves no pollable key.

Falsification checks: reports.report's replay path does return the historical ACK for a same-fingerprint retry (verified in evidence-reports.ts and exercised by the lost-ACK test in tests/evidence-reports.test.ts), so the only blocker is the dispatcher pre-check; I also confirmed no dispatcher or service code path returns the reportId on a conflict, and that the fixture test for this scenario (withholds a queued-report ACK after an actual draft edit) asserts the conflict without exercising any recovery.

🔵 Issue 12 — PR title misattributes the new human-review feature to the already-merged KB-04 slice

nit · identified by z-ai/glm-5.3-flash

The title "[KB-04] Add human-reviewed reports and native agent evidence workflow" labels this work as KB-04, but every document in the repository (including ones this PR edits, e.g. docs/AGENT_WORKFLOW.md's "The merged KB-04 source exit closes only its source slice" and README.md's "[Merged KB-04 source] ... adds the optional five-operation HTTP/MCP adapter") defines KB-04 as the previously merged transport slice (PR #5) and describes this change as the new, unnumbered unpublished 0.1.3 evidence-report candidate. Reviewers and the release ledger index work by these identifiers; attributing a new feature to a closed slice obscures that this is a distinct, still-ungated candidate requiring its own review, CI, and trusted release.

Workflow run

Comment thread packages/mcp/src/dispatcher.ts Resolved
Comment thread packages/mcp/src/dispatcher.ts Resolved
Comment thread packages/mcp/src/schemas.ts Resolved
Comment thread README.md Resolved
Comment thread docs/AGENT_API.md Resolved
Comment thread packages/mcp/src/dispatcher.ts Resolved
Comment thread packages/mcp/src/dispatcher.ts Resolved

@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 Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: e77d791848

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@FlyOverCoderKY FlyOverCoderKY changed the title [KB-04] Add human-reviewed reports and native agent evidence workflow [PG-01/RG-01] Share reviewed KB reports with native agents Nov 8, 2026
@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

@codex review

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 58aefc2177

ℹ️ 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".

@github-actions github-actions 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.

OpenRouter pull-request review

Verdict: clean
Scope: latest-commit (commit-range)
Mode: verify
Commit: 58aefc21770b6af976bce5cb15f32f8c10fc4dfc
Judge: skipped (one successful review lane; no merge needed)
Cost: $0.1676

Lanes

  • openai/gpt-6.1-sol: ok (0 finding(s), 35.2s, 179323+1707 tokens (142925 cached), 5 tool round(s), via Azure, $0.13)
  • z-ai/glm-5.3-flash: failed-open ($0.0330 spent) — resolutions are incomplete; missing entries for carried finding(s): r1-1, r1-10, r1-11, r1-2, r1-3

Round 2 resolution

  • ✅ r1-1 fixed correctly — Insufficient documented reviewer permissions: The documented minimum reviewer now includes evidenceSubmit alongside the confirmation permission, draftRead, and evidenceRead. staff() enforces the requirements-read prerequisite. The added public-application test covers reading, confirming, qualifying every required check, and publication by a separate publisher with exactly these four reviewer permissions.
  • ✅ r1-2 fixed correctly — Unrecoverable historical report acknowledgement: The dispatcher no longer rejects historical retries before reaching the report service. Exact replay precedes the service's new-admission generation check, while the dispatcher retains its before/after draft fence. Added HTTP/MCP tests cover acknowledgement recovery after evidence-only generation changes and after an actual draft edit.
  • ✅ r1-4 fixed correctly — Permanent revocation of an evidence identifier: Revocation now compares the hash of the exact reconstructed accepted evidence, including the revoked version and report's human attestation, using the core digest implementation. The added replacement test verifies that an old revoked receipt remains refused while a separately reviewed execution using the same evidence identifier qualifies and publishes.
  • ✅ r1-3 fixed correctly — Unbound report command generation: The dispatcher forwards expectedGeneration as expectedArticleGeneration, and the report service includes that optional field in the retained command fingerprint when present. Added service and HTTP/MCP tests cover historical recovery with the original generation and refusal when the same command is rebound to another generation.
  • ✅ r1-5 fixed correctly — Missing post-write principal-authority checks: write() now rechecks current submission or staff authority after successful storage and after competing-command replay. reset() and drain() also recheck staff authority after their transactions. Added storage-barrier tests cover all four mutation paths and competing report/decision CAS recovery, preserving committed effects while withholding acknowledgements.
  • ✅ r1-6 fixed correctly — Silent fallback from invalid report results: The dispatcher selects the concrete output schema from the input variant rather than using a report/legacy output union. Report ledger and status results are validated before use, and malformed extended metadata maps to unavailable. Added HTTP/MCP tests cover malformed ledger/status fields and unchanged legacy requirements responses with a configured report port.
  • ✅ r1-9 fixed correctly — Six un-edited docs still declare 0.1.2 an unpublished candidate, contradicting this PR's verified-0.1.2/candidate-0.1.3 flip: The six previously inconsistent documents now distinguish the historical verified 0.1.1 release, current verified 0.1.2 release, and unpublished 0.1.3 candidate. Repository searches found no remaining instances of the cited 0.1.2 candidate declarations.
  • ✅ r1-10 fixed correctly — Polled reportStatus/status result is not fenced against a concurrent staff decision, so the agent can receive a stale receipt/status: Requirements polling re-reads and validates report status after its other awaited fences, returning conflict on observed DTO drift. The service also performs a final report observation after authority and epoch reads. Added tests exercise real confirmation and reassessment during these windows; the documented guarantee remains a point-in-time observation rather than a globally atomic snapshot.
  • ✅ r1-11 fixed correctly — Documented uncertain-report recovery is unreachable once the article changed: the dispatcher's generation pre-check blocks the service's replay, stranding a que: The blocking dispatcher generation pre-check has been removed, allowing exact historical replay through the shared service at a stable newer generation. Generation remains bound to command identity, stale new commands are refused, and the added cross-transport recovery test covers an acknowledgement withheld after a committed report followed by a draft edit.
  • 3 nit finding(s) from earlier rounds retired (severity floor for follow-up rounds is risk).
  • Open findings after this round: 0 (0 bug-severity).

No structured findings from the successful lane(s).

Workflow run

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 58aefc2177

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

All twelve canonical R1 findings are addressed in 58aefc2 or the corrected PR title. The ten actual OpenRouter inline threads have fix-specific replies and resolutions. Canonical r1-9 duplicates the current-documentation issue in r1-7; r1-12 is addressed by the PG-01/RG-01 title. Neither has a separate inline thread to resolve.

The separate security P2 has its own fix and regression for missing authoritative evidence history. A fresh Codex Security review completed clean on 58aefc2, and that thread is now resolved. Exact versioned revocation and missing evidence context remain distinct checks.

The 224 affected service/HTTP/MCP cases and updated packed protocol proof passed locally. Current-head full CI and complete two-lane full-PR review remain separate merge requirements. The earlier incremental review had an incomplete lane and is not used as the complete review gate.

@github-actions github-actions 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.

OpenRouter pull-request review

Verdict: issues
Scope: full-pr (full-pr)
Mode: verify
Commit: 58aefc21770b6af976bce5cb15f32f8c10fc4dfc
Judge: openai/gpt-5.6-luna
Cost: $0.6100 (lanes $0.6089 + judge $0.0010)

Lanes

  • openai/gpt-6.1-sol: ok (0 finding(s), 49.4s, 544211+2394 tokens (440059 cached), 5 tool round(s), via Azure, $0.36)
  • z-ai/glm-5.3-flash: ok (1 finding(s), 590.5s, 6392959+72712 tokens (6241536 cached), 40 tool round(s), via InferenceNet, $0.25)

Round 3 resolution

  • No prior findings were open.
  • Open findings after this round: 1 (0 bug-severity).

Findings

🔵 Issue 1 — Report admission text validation diverges from core qualification, so a confirmed report can be permanently unqualifiable

packages/application/src/evidence-reports.ts:347 · nit · identified by z-ai/glm-5.3-flash

An agent can queue a report whose evidence.steps entry has leading/trailing whitespace (e.g. " Run the export"), get it human-confirmed, and then be unable to ever qualify it. The MCP/HTTP evidenceSubmission schema validates steps with a plain z.string().min(1).max(...) (packages/mcp/src/schemas.ts), so the transport accepts untrimmed steps, and the report service's parseKnowledgeEvidence re-validates each step with scalar()/boundedString() (packages/application/src/evidence-reports.ts:347, :240, :276), which checks only length and control characters — not core's trimmed-text rule. Admission succeeds, decide(..., "confirmed") also succeeds because valid() only checks hashes, build, requirement match, and freshness, and the failure surfaces only at the later receipt-bearing submitEvidence: core's verifyEvidence runs text(step, "evidence.step", ...) (packages/core/src/articles.ts:341-345, packages/core/src/validation.ts:57), which requires value.trim() === value. The KB throws KnowledgeBaseError("invalid"), which the dispatcher maps to invalid_request — the agent sees a parse-style error instead of prerequisite, and the human review is wasted (the report stays confirmed until staff reassess or reset it).

The same mechanism diverges in the opposite direction: boundedString forbids C1 controls (\u007F-\u009F) that core's text() permits, so a submission the legacy flow accepts is refused at report admission. Both directions are fail-closed; no evidence is ever recorded from an unqualifiable report.

What I checked: traced the full chain (transport zod → service parseKnowledgeEvidence → valid() at decide → core recordEvidence/verifyEvidence) and confirmed every other submitted field is either trim-checked by the transport's boundedText-based identifier schema or bound to a trimmed policy value before confirmation, so steps (and marginally applicability.locale, which core's locale regex also rejects later) is the remaining gap. The fixtures and protocol proof only use trimmed steps, so no test hits it; the existing docs' "a confirmed receipt can therefore be refused" umbrella covers the outcome but not this admission-vs-qualification mismatch. Aligning scalar with core's text() rule (or documenting the divergence) would remove the wasted-review hazard.

Workflow run

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

@codex review

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 81c2d925e2

ℹ️ 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".

@github-actions github-actions 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.

OpenRouter pull-request review

Verdict: issues
Scope: latest-commit (commit-range)
Mode: verify
Commit: 81c2d925e2b3a4d36ced99dddf24ef6f693b260d
Judge: openai/gpt-5.6-luna
Cost: $0.1400 (lanes $0.1395 + judge $0.0006)

Lanes

  • openai/gpt-6.1-sol: ok (0 finding(s), 13.9s, 87268+609 tokens (58161 cached), 3 tool round(s), via Azure, $0.0931)
  • z-ai/glm-5.3-flash: ok (1 finding(s), 198.1s, 866814+22545 tokens (742848 cached), 22 tool round(s), via Makora, $0.0463)

Round 4 resolution

  • 1 nit finding(s) from earlier rounds retired (severity floor for follow-up rounds is risk).
  • Open findings after this round: 1 (0 bug-severity).

Findings

🔵 Issue 1 — Doc says Core would trim padded evidence, but Core rejects it

docs/EVIDENCE_REPORTS.md:74 · nit · identified by z-ai/glm-5.3-flash

The added paragraph in docs/EVIDENCE_REPORTS.md says new report admission "rejects evidence text fields and steps that Core would trim", implying Core accepts padded values by trimming them (which would make the guard stricter than Core).

That characterization is wrong. Core never trims anything: the only trim uses in packages/core/src are rejection checks — text() refuses value.trim() !== value (packages/core/src/validation.ts:66) and a content-emptiness check (line 171). verifyEvidence in packages/core/src/articles.ts rejects padded evidence fields rather than normalizing them, and the PR's own fixture states "Core refused this evidence" for padded steps. The doc's later added paragraph ("the verifier refuse its malformed syntax") is consistent with this, so the patch contradicts itself on Core's behavior.

The operational behavior is correct and matches Core exactly (the guard's regex and 64-char locale cap are identical to validateApplicability, and the field list covers every text() call in verifyEvidence), so this is docs-only. But the mischaracterization could mislead a maintainer into loosening the guard on the false theory that it over-rejects relative to Core.

Workflow run

Comment thread docs/EVIDENCE_REPORTS.md Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 81c2d925e2

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

@codex review

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

@codex security review

@github-actions github-actions 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.

OpenRouter pull-request review

Verdict: clean
Scope: latest-commit (commit-range)
Mode: verify
Commit: 487cab327bc9d239dfd0ccdbc1150e7277e356db
Judge: openai/gpt-5.6-luna
Cost: $0.0547 (lanes $0.0545 + judge $0.0001)

Lanes

  • openai/gpt-6.1-sol: ok (0 finding(s), 13.9s, 53351+534 tokens (40627 cached), 4 tool round(s), via Azure, $0.0453)
  • z-ai/glm-5.3-flash: ok (0 finding(s), 40.2s, 144883+4494 tokens (123456 cached), 11 tool round(s), via Wafer, $0.0092)

Round 5 resolution

  • 1 nit finding(s) from earlier rounds retired (severity floor for follow-up rounds is risk).
  • Open findings after this round: 0 (0 bug-severity).

No structured findings from the successful lane(s).

Workflow run

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 487cab327b

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 487cab327b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@github-actions github-actions 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.

OpenRouter pull-request review

Verdict: clean
Scope: full-pr (full-pr)
Mode: verify
Commit: 487cab327bc9d239dfd0ccdbc1150e7277e356db
Judge: openai/gpt-5.6-luna
Cost: $0.5490 (lanes $0.5489 + judge $0.0001)

Lanes

  • openai/gpt-6.1-sol: ok (0 finding(s), 38.1s, 601183+1998 tokens (489890 cached), 5 tool round(s), via Azure, $0.38)
  • z-ai/glm-5.3-flash: ok (0 finding(s), 298.2s, 4865571+60652 tokens (4502016 cached), 32 tool round(s), via PrimeIntellect, $0.17)

Round 6 resolution

  • No prior findings were open.
  • Open findings after this round: 0 (0 bug-severity).

No structured findings from the successful lane(s).

Workflow run

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor Author

The current head 487cab3 has completed the merge gates:

  • Both actual Node 22/24 CI lanes passed 675 Vitest cases across 16 files and all 128 release checks, with zero skips. Formatting, types, example, four-package consumers and the packed authenticated protocol proof passed.
  • Full-PR OpenRouter round 6 is clean with zero OPEN findings. Both independent lanes completed successfully; their complete 37-path, 344,317-byte input matches the immutable PR diff. Earlier incomplete/incremental and superseded results are retained separately.
  • Current-head CodeQL, Codex code review and Codex Security review completed successfully. All 13 review threads are resolved. The independent audit and its 86 retained input digests were checked.
  • Copilot was requested for this head and produced no review during the bounded 30-minute window. No Copilot review is counted for this merge; this is not a passing result and no cause is inferred. The completed independent reviews and CI supply the review coverage used here.

Proceeding with a normal squash merge pinned to this exact head. Source merge does not publish packages or activate either site. The synchronized 0.1.3 release still requires the protected signed tag, original-artifact approval and strict registry verification before host adoption.

@FlyOverCoderKY
FlyOverCoderKY merged commit 8b4c25a into main Nov 8, 2026
7 of 9 checks passed
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.

1 participant