Repository navigation
Conversation
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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge, with the previous test mismatch addressed and no new blocking findings. SummaryThe PR labels rejected partial
Reviews (3) · Last reviewed commit: "test(mcp): align partial retention expec..." · Reviewed by Greptile |
When toPartialErrorToolResult cannot record a completed partial observation, deliver it as unretained-evidence with the retention error instead of inline-evidence with unknown retention. Fixes morluto#8425
Update boundary tests that exercise toPartialErrorToolResult retention refusal to expect unretained-evidence and the retention error projection.
Align MCP boundary expectations with ToolResultDelivery's retention_error field after rebasing onto main's ledgerRetentionFact path.
10f8255 to
2eb6a99
Compare
Summary
Fixes #8425.
When
toPartialErrorToolResultrecords a completed partial observation and the ledger refuses it, deliver that observation aspartial_observation.kind: "unretained-evidence"together withpartial_observation_retention_error, instead ofinline-evidencewithretention: "unknown". Callers can distinguish completed-but-unretained Evidence from retained references, and the original retention diagnosis stays visible. Overflow omission reportsretention: "unretained".Problem and expected behavior
After a tool completed a partial observation, a retention refusal still labeled the returned Evidence as
inline-evidencewithretention: "unknown"and dropped the retention error projection. Expected: preserve the completed observation as unretained Evidence, surface the retention failure, and never advertise a ledger reference for an uncommitted record.Change and scope
Update
ToolResultDelivery.toPartialErrorToolResultonly: onrecordEvidencefailure, attachunretained-evidenceplusprojectAnalysisErrorWithoutPartialObservation(recorded.error). Overflow compaction already omits unretained candidates; tests now expectretention: "unretained". No new retention admission, CLI paths, or provider changes.Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
ToolResultDelivery.toPartialErrorToolResult; consumers of partial-observation error details.details.partial_observationkind/retention vocabulary for this path; no tool schema change.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
tests/boundary/mcp/toolResult.test.ts— retention refusal returnsunretained-evidenceplus retention error code; overflow omission usesretention: "unretained".inline-evidence/retention: "unknown"withoutpartial_observation_retention_error.For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
Boundary: MCP error delivery for refused partial Evidence retention. Lifecycle: not applicable (no session open/close change).
For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/mcp/toolResult.test.ts tests/boundary/mcp/reverseEngineeringPartialMcp.test.ts tests/boundary/mcp/fridaLifecycleMcp.test.ts tests/boundary/mcp/targetContentFramingMcp.test.ts— 93 passednpm run check:fast— typecheck and lint passedCompatibility, safety, and release
kind: "inline-evidence"withretention: "unknown"on this retention-refusal path must acceptunretained-evidenceandpartial_observation_retention_error. Successful retention and other error paths are unchanged.Author readiness
Human owner: @BeqaKs
Before merge
type(scope): outcome.