Repository navigation
CONTRACT: retain ambiguous tool delivery and incomplete search evidence - #4312
schlessera wants to merge 23 commits into
Conversation
Independent reviewReviewed head a609e53 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "a609e53a89cd74161813b7d589dfc19fd17a5c79",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:206 misses overlapping numeric delimiters. Pi grep can emit `notes/voyage:2:7:sirens` for line 7 of `notes/voyage:2`. The first match consumes `:2:`, leaving `7:sirens`, so the parser checks the wrong filename and records neither its explicit mark nor unknown coverage."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:204 applies grep line parsing to Glob text inside a structured content block. A Glob result `[{\"type\":\"text\",\"text\":\"notes/voyage:2:home.md\"}]` checks only `notes/voyage`, silently losing the explicit mark on the returned filename."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:203 skips truncation detection for every plain Glob line because the fallback sets `path:true`. A clipped path such as `notes/voy...` passes path validation and produces no unknown signal, regressing the previous truncation guard."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:202 accepts the Pi empty sentinel per trimmed line. Both a whitespace-padded ` No matches. ` and a multiline response mixing a match with `No matches.` suppress unknown coverage, although Pi emits the sentinel only as the entire text result of an empty search."
}
]
} |
Independent reviewReviewed head a609e53 against base 63bb400. Reviewer: agent. 4 findings: 4 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "a609e53a89cd74161813b7d589dfc19fd17a5c79",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:206 misses overlapping numeric delimiters. Pi grep can emit `notes/voyage:2:7:sirens` for line 7 of `notes/voyage:2`. The first match consumes `:2:`, leaving `7:sirens`, so the parser checks the wrong filename and records neither its explicit mark nor unknown coverage.",
"disposition": "fixed",
"commit": "2416782c49c529e8673d0209040a013e2d397603"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:204 applies grep line parsing to Glob text inside a structured content block. A Glob result `[{\"type\":\"text\",\"text\":\"notes/voyage:2:home.md\"}]` checks only `notes/voyage`, silently losing the explicit mark on the returned filename.",
"disposition": "fixed",
"commit": "2416782c49c529e8673d0209040a013e2d397603"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:203 skips truncation detection for every plain Glob line because the fallback sets `path:true`. A clipped path such as `notes/voy...` passes path validation and produces no unknown signal, regressing the previous truncation guard.",
"disposition": "fixed",
"commit": "2416782c49c529e8673d0209040a013e2d397603"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:202 accepts the Pi empty sentinel per trimmed line. Both a whitespace-padded ` No matches. ` and a multiline response mixing a match with `No matches.` suppress unknown coverage, although Pi emits the sentinel only as the entire text result of an empty search.",
"disposition": "fixed",
"commit": "2416782c49c529e8673d0209040a013e2d397603"
}
]
} |
Independent reviewReviewed head 2416782 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "2416782c49c529e8673d0209040a013e2d397603",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:196 ignores Claude GrepOutput pagination. A result with numFiles: 1, totalFiles: 2 and one ordinary filename produces no signal despite a known omitted file. Retain unknown coverage when the SDK totals establish truncation."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:208 accepts the Pi empty sentinel after flattening arbitrary JSON. I verified that {\"matches\":\"No matches.\"} produces no signal, although Pi emits neither that envelope nor that field. Malformed output can therefore leave coverage healthy."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:205 treats malformed structured Glob output as a plain filename. I verified that a payload clipped immediately after the first quoted filename in a filenames array produces no signal. The named file's mark is missed and the truncated remainder leaves no unknown evidence."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:223 assumes Claude content mode includes line numbers, but the SDK supports `-n: false`. For a marked notes/voyage.md with matching text `signal:2:echo`, the line `notes/voyage.md:signal:2:echo` is attributed to notes/voyage.md:signal. The actual mark and unknown remainder are both lost."
}
]
} |
Independent reviewReviewed head 2416782 against base 63bb400. Reviewer: agent. 4 findings: 4 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "2416782c49c529e8673d0209040a013e2d397603",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:196 ignores Claude GrepOutput pagination. A result with numFiles: 1, totalFiles: 2 and one ordinary filename produces no signal despite a known omitted file. Retain unknown coverage when the SDK totals establish truncation.",
"disposition": "fixed",
"commit": "a2d5e2c022a9788d2c7cea57d064eb397ecee7d4"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:208 accepts the Pi empty sentinel after flattening arbitrary JSON. I verified that {\"matches\":\"No matches.\"} produces no signal, although Pi emits neither that envelope nor that field. Malformed output can therefore leave coverage healthy.",
"disposition": "fixed",
"commit": "a2d5e2c022a9788d2c7cea57d064eb397ecee7d4"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:205 treats malformed structured Glob output as a plain filename. I verified that a payload clipped immediately after the first quoted filename in a filenames array produces no signal. The named file's mark is missed and the truncated remainder leaves no unknown evidence.",
"disposition": "fixed",
"commit": "a2d5e2c022a9788d2c7cea57d064eb397ecee7d4"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:223 assumes Claude content mode includes line numbers, but the SDK supports `-n: false`. For a marked notes/voyage.md with matching text `signal:2:echo`, the line `notes/voyage.md:signal:2:echo` is attributed to notes/voyage.md:signal. The actual mark and unknown remainder are both lost.",
"disposition": "fixed",
"commit": "a2d5e2c022a9788d2c7cea57d064eb397ecee7d4"
}
]
} |
Independent reviewReviewed head a2d5e2c against base 63bb400. Reviewer: agent. 3 findings: 0 fixed, 0 filed, 0 rejected, 3 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "a2d5e2c022a9788d2c7cea57d064eb397ecee7d4",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:218 — A Pi grep scoped to a directory named `[voyage]` can return `[voyage]/log.md:1:sirens`. The opening bracket causes the parser to skip the entire result, so it loses the explicit mark on that file and any independent signals from later lines. Only legacy_unknown survives."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:232 — Claude Grep accepts a page that reaches appliedLimit as complete when the optional total is absent. For example, one ordinary filename with numFiles=1 and appliedLimit=1 produces no unknown signal even though the detector cannot tell whether the limit omitted additional files."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:241 — Count mode never checks numMatches. A result with numFiles=0, filenames=[], content=\"\", and numMatches=3 passes as healthy empty evidence even though it reports matches without identifying any source. This loses the unknown remainder required for malformed output."
}
]
} |
Independent reviewReviewed head a2d5e2c against base 63bb400. Reviewer: agent. 3 findings: 3 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "a2d5e2c022a9788d2c7cea57d064eb397ecee7d4",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:218 — A Pi grep scoped to a directory named `[voyage]` can return `[voyage]/log.md:1:sirens`. The opening bracket causes the parser to skip the entire result, so it loses the explicit mark on that file and any independent signals from later lines. Only legacy_unknown survives.",
"disposition": "fixed",
"commit": "8ad5efe360721169a3e09850b7191e2ce3f02dea"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:232 — Claude Grep accepts a page that reaches appliedLimit as complete when the optional total is absent. For example, one ordinary filename with numFiles=1 and appliedLimit=1 produces no unknown signal even though the detector cannot tell whether the limit omitted additional files.",
"disposition": "fixed",
"commit": "8ad5efe360721169a3e09850b7191e2ce3f02dea"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:241 — Count mode never checks numMatches. A result with numFiles=0, filenames=[], content=\"\", and numMatches=3 passes as healthy empty evidence even though it reports matches without identifying any source. This loses the unknown remainder required for malformed output.",
"disposition": "fixed",
"commit": "8ad5efe360721169a3e09850b7191e2ce3f02dea"
}
]
} |
Independent reviewReviewed head 8ad5efe against base 63bb400. Reviewer: agent. 3 findings: 0 fixed, 0 filed, 0 rejected, 3 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "8ad5efe360721169a3e09850b7191e2ce3f02dea",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:225 — One malformed field discards every valid Glob filename. A result containing a marked path and a non-string sibling records only legacy_unknown, losing the independent user_marked occurrence. The Grep branch at line 231 has the same defect."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:221 — A valid Pi grep row such as `[voyage]/log.md:1:sirens` gets legacy_unknown solely because its filename begins with `[`. Searching that ordinary, unmarked directory now restricts a healthy chat. The new bracket-path integration test checks only the number of marks and misses the extra occurrence."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:242 — A page longer than its positive limit passes as complete when a matching total is present. For example, two distinct filenames with appliedLimit: 1 and totalFiles: 2 produce no unknown signal, even though the declared limit makes the result internally inconsistent."
}
]
} |
Independent reviewReviewed head 8ad5efe against base 63bb400. Reviewer: agent. 3 findings: 3 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "8ad5efe360721169a3e09850b7191e2ce3f02dea",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:225 — One malformed field discards every valid Glob filename. A result containing a marked path and a non-string sibling records only legacy_unknown, losing the independent user_marked occurrence. The Grep branch at line 231 has the same defect.",
"disposition": "fixed",
"commit": "8a22ec1bd03995999c927cd276fb82e11a625283"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:221 — A valid Pi grep row such as `[voyage]/log.md:1:sirens` gets legacy_unknown solely because its filename begins with `[`. Searching that ordinary, unmarked directory now restricts a healthy chat. The new bracket-path integration test checks only the number of marks and misses the extra occurrence.",
"disposition": "fixed",
"commit": "8a22ec1bd03995999c927cd276fb82e11a625283"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:242 — A page longer than its positive limit passes as complete when a matching total is present. For example, two distinct filenames with appliedLimit: 1 and totalFiles: 2 produce no unknown signal, even though the declared limit makes the result internally inconsistent.",
"disposition": "fixed",
"commit": "8a22ec1bd03995999c927cd276fb82e11a625283"
}
]
} |
Independent reviewReviewed head 8a22ec1 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "8a22ec1bd03995999c927cd276fb82e11a625283",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:194 rejects CR and LF before looking up a structured filename. Both are legal in POSIX filenames and accepted by markKey. A Glob result containing such a marked workspace file therefore records only legacy_unknown and loses both the explicit mark and workspace exposure required by #4275."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:229 treats Pi’s sentinel as complete even when the result also contained a non-text block. safetyResultInput filters those blocks before joining text, so a text block containing `No matches.` plus an image reaches this branch as the exact sentinel. The JSON-wrapper tests bypass that conversion and miss the suppressed unknown remainder."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:261 accepts duplicate count rows for one filename. With filenames [\"notes/loom.md\"], numFiles 1, and content \"notes/loom.md:1\\nnotes/loom.md:1\", the set collapses both rows, the sum matches numMatches 2, and coverage stays healthy despite malformed per-file counts."
},
{
"summary": "packages/ui-server/tests/safety-result-exits.test.ts:478 bypasses both backends’ result hooks by calling the collector directly. The Claude case also executes Pi grep at line 476. Removing result forwarding from Claude’s PostToolUse hook or Pi’s worker RPC would leave this test green, so it does not establish the requested backend-to-ledger proof for #4274."
}
]
} |
Independent reviewReviewed head 8a22ec1 against base 63bb400. Reviewer: agent. 4 findings: 4 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "8a22ec1bd03995999c927cd276fb82e11a625283",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:194 rejects CR and LF before looking up a structured filename. Both are legal in POSIX filenames and accepted by markKey. A Glob result containing such a marked workspace file therefore records only legacy_unknown and loses both the explicit mark and workspace exposure required by #4275.",
"disposition": "fixed",
"commit": "accf202cf39c871f9ad4697d1df3eb2df761f546"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:229 treats Pi’s sentinel as complete even when the result also contained a non-text block. safetyResultInput filters those blocks before joining text, so a text block containing `No matches.` plus an image reaches this branch as the exact sentinel. The JSON-wrapper tests bypass that conversion and miss the suppressed unknown remainder.",
"disposition": "fixed",
"commit": "accf202cf39c871f9ad4697d1df3eb2df761f546"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:261 accepts duplicate count rows for one filename. With filenames [\"notes/loom.md\"], numFiles 1, and content \"notes/loom.md:1\\nnotes/loom.md:1\", the set collapses both rows, the sum matches numMatches 2, and coverage stays healthy despite malformed per-file counts.",
"disposition": "fixed",
"commit": "accf202cf39c871f9ad4697d1df3eb2df761f546"
},
{
"summary": "packages/ui-server/tests/safety-result-exits.test.ts:478 bypasses both backends’ result hooks by calling the collector directly. The Claude case also executes Pi grep at line 476. Removing result forwarding from Claude’s PostToolUse hook or Pi’s worker RPC would leave this test green, so it does not establish the requested backend-to-ledger proof for #4274.",
"disposition": "fixed",
"commit": "accf202cf39c871f9ad4697d1df3eb2df761f546"
}
]
} |
Independent reviewReviewed head accf202 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "accf202cf39c871f9ad4697d1df3eb2df761f546",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:293 reads `interruption` outside the helper where it is defined. Both existing denied-shell regression cases throw ReferenceError during setup, before either hook ordering is exercised."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:229 can lose a marked Pi filename containing a newline. For the single filename `raft:1:sail\\nloom.md`, the shipped grep command emits `./raft:1:sail\\nloom.md:1:sirens`. Both fragments pass as complete rows, so the collector checks two unrelated paths and records neither the full-path mark nor an unknown remainder."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:343 accepts the workspace occurrence created by the Grep input itself. If output-path detection drops the native result, finalizing the input as interrupted_unknown still satisfies both row assertions. The native proof needs to require the occurrence with detector `tool_search_output`."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:342 accepts two delivered results. Both native searches run with the same delay and can reach PostToolUse before the first callback aborts the turn. Because the collector keeps a gap even for two identical ambiguous reports, this test can pass without exercising the missing-second-result premise of #4274."
}
]
} |
Independent reviewReviewed head accf202 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "accf202cf39c871f9ad4697d1df3eb2df761f546",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:293 reads `interruption` outside the helper where it is defined. Both existing denied-shell regression cases throw ReferenceError during setup, before either hook ordering is exercised."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:229 can lose a marked Pi filename containing a newline. For the single filename `raft:1:sail\\nloom.md`, the shipped grep command emits `./raft:1:sail\\nloom.md:1:sirens`. Both fragments pass as complete rows, so the collector checks two unrelated paths and records neither the full-path mark nor an unknown remainder."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:343 accepts the workspace occurrence created by the Grep input itself. If output-path detection drops the native result, finalizing the input as interrupted_unknown still satisfies both row assertions. The native proof needs to require the occurrence with detector `tool_search_output`."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:342 accepts two delivered results. Both native searches run with the same delay and can reach PostToolUse before the first callback aborts the turn. Because the collector keeps a gap even for two identical ambiguous reports, this test can pass without exercising the missing-second-result premise of #4274."
}
]
} |
Independent reviewReviewed head accf202 against base 63bb400. Reviewer: agent. 4 findings: 4 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "accf202cf39c871f9ad4697d1df3eb2df761f546",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:293 reads `interruption` outside the helper where it is defined. Both existing denied-shell regression cases throw ReferenceError during setup, before either hook ordering is exercised.",
"disposition": "fixed",
"commit": "459e206f7b0dfab625d5f6573a875b948cf47185"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:229 can lose a marked Pi filename containing a newline. For the single filename `raft:1:sail\\nloom.md`, the shipped grep command emits `./raft:1:sail\\nloom.md:1:sirens`. Both fragments pass as complete rows, so the collector checks two unrelated paths and records neither the full-path mark nor an unknown remainder.",
"disposition": "fixed",
"commit": "459e206f7b0dfab625d5f6573a875b948cf47185"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:343 accepts the workspace occurrence created by the Grep input itself. If output-path detection drops the native result, finalizing the input as interrupted_unknown still satisfies both row assertions. The native proof needs to require the occurrence with detector `tool_search_output`.",
"disposition": "fixed",
"commit": "459e206f7b0dfab625d5f6573a875b948cf47185"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:342 accepts two delivered results. Both native searches run with the same delay and can reach PostToolUse before the first callback aborts the turn. Because the collector keeps a gap even for two identical ambiguous reports, this test can pass without exercising the missing-second-result premise of #4274.",
"disposition": "fixed",
"commit": "459e206f7b0dfab625d5f6573a875b948cf47185"
}
]
} |
Independent reviewReviewed head 459e206 against base 63bb400. Reviewer: agent. 3 findings: 0 fixed, 0 filed, 0 rejected, 3 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "459e206f7b0dfab625d5f6573a875b948cf47185",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-backend-pi/src/file-tools.ts:78 discards grep's exit status. An invalid regex or missing path produces empty stdout and exit 2, which becomes the same `No matches.` result as exit 1. The collector now treats that failed search as complete. A read error after some matches can likewise pass off partial stdout as complete."
},
{
"summary": "packages/ui-backend-pi/src/file-tools.ts:63 omits `-H`. GNU grep suppresses the filename for a single file operand even with `-rInZE`, so a successful ordinary single-file search emits only `1:matched text` and the collector records `legacy_unknown`. Force the filename prefix for both file and directory operands."
},
{
"summary": "packages/ui-backend-pi/src/worker-protocol.ts:99 uses an appended newline to signal an incomplete or mixed result. If the text is a framed match missing only its final newline, that append completes the row. The collector then accepts the malformed result as healthy despite the explicit incomplete flag or an accompanying non-text block."
}
]
} |
Independent reviewReviewed head b4c2556 against base 63bb400. Reviewer: agent. 4 findings: 3 fixed, 1 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "b4c2556edd422bfd9e43ca2f7f1184159a0baf69",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/recorder.ts:387 — Claude’s stream adapter forwards displayed tool results as plain text. I verified that a Grep filename-mode result of `workspaces/voyage/sirens.md` with an explicit mark now produces only `legacy_unknown`. The recorder loses both the workspace and mark evidence. Its updated test supplies structured JSON instead of the display text this caller receives.",
"disposition": "fixed",
"commit": "2754ed582798fc00ac0999f1dfd6bcddd114cd6a"
},
{
"summary": "packages/ui-server/tests/helpers/native-safety-proof.ts:9 — The native oracle accepts any `tool_search_output` occurrence, including `legacy_unknown` from an unparseable result. Its SQL projection omits `source`, so discarding the first search’s workspace filename still satisfies the assertion intended to prove that the actual returned source reached the ledger.",
"disposition": "fixed",
"commit": "2754ed582798fc00ac0999f1dfd6bcddd114cd6a"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:208 — The fixture passes `searched` to the assertions, but the running, duplicate and retooled cases never assert it. The deadline and error paths can interrupt or deny a call without the wrapper writing its marker. Only the denied case checks the marker, and it checks for absence. This leaves #4274’s required positive invocation witnesses missing.",
"disposition": "fixed",
"commit": "2754ed582798fc00ac0999f1dfd6bcddd114cd6a"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:178 — The changed fixture configures PATH and USE_BUILTIN_RIPGREP directly. The prerequisite qualified OS boundary in #4313 is still open, and I found no passing hosted retention qualification for this head in its check runs. The changed-head native proof required by #4274 remains outstanding.",
"disposition": "filed",
"issue": "schlessera/brain-kit#4313"
}
]
} |
Independent reviewReviewed head 2754ed5 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "2754ed582798fc00ac0999f1dfd6bcddd114cd6a",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:232 — A Claude display filename that parses as JSON bypasses filename lookup. A marked file named `123` loses its explicit mark. A filename whose text is a valid empty Glob response loses both the mark and unknown coverage. Reproduced both with the display parser."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:236 — A flattened Glob result containing one marked filename `notes/voyage\\nloom.md` is treated as two complete, ordinary filenames. The display parser returned zero signals. Without structured filename boundaries, these rows need unknown coverage alongside any identifiable sources."
},
{
"summary": "packages/ui-backend-pi/src/file-tools.ts:82 — A grep wrapper that writes the literal `No matches.` without a newline and exits 1 with empty stderr produces the same frame and process status as genuinely empty stdout. The collector therefore accepts malformed nonempty output as a verified empty search, contrary to #4276."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The changed fixture still depends on an ambient PATH and a temporary wrapper. The generic isolation prerequisite #4313 remains open, and the required passing hosted qualification for this head and its complete retention/native inventory is outstanding."
}
]
} |
1 similar comment
Independent reviewReviewed head 2754ed5 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "2754ed582798fc00ac0999f1dfd6bcddd114cd6a",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:232 — A Claude display filename that parses as JSON bypasses filename lookup. A marked file named `123` loses its explicit mark. A filename whose text is a valid empty Glob response loses both the mark and unknown coverage. Reproduced both with the display parser."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:236 — A flattened Glob result containing one marked filename `notes/voyage\\nloom.md` is treated as two complete, ordinary filenames. The display parser returned zero signals. Without structured filename boundaries, these rows need unknown coverage alongside any identifiable sources."
},
{
"summary": "packages/ui-backend-pi/src/file-tools.ts:82 — A grep wrapper that writes the literal `No matches.` without a newline and exits 1 with empty stderr produces the same frame and process status as genuinely empty stdout. The collector therefore accepts malformed nonempty output as a verified empty search, contrary to #4276."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The changed fixture still depends on an ambient PATH and a temporary wrapper. The generic isolation prerequisite #4313 remains open, and the required passing hosted qualification for this head and its complete retention/native inventory is outstanding."
}
]
} |
Independent reviewReviewed head 2754ed5 against base 63bb400. Reviewer: agent. 4 findings: 3 fixed, 1 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "2754ed582798fc00ac0999f1dfd6bcddd114cd6a",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:232 — A Claude display filename that parses as JSON bypasses filename lookup. A marked file named `123` loses its explicit mark. A filename whose text is a valid empty Glob response loses both the mark and unknown coverage. Reproduced both with the display parser.",
"disposition": "fixed",
"commit": "9d32900341a4abb6e36b9ec0549256f51a42afa6"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:236 — A flattened Glob result containing one marked filename `notes/voyage\\nloom.md` is treated as two complete, ordinary filenames. The display parser returned zero signals. Without structured filename boundaries, these rows need unknown coverage alongside any identifiable sources.",
"disposition": "fixed",
"commit": "9d32900341a4abb6e36b9ec0549256f51a42afa6"
},
{
"summary": "packages/ui-backend-pi/src/file-tools.ts:82 — A grep wrapper that writes the literal `No matches.` without a newline and exits 1 with empty stderr produces the same frame and process status as genuinely empty stdout. The collector therefore accepts malformed nonempty output as a verified empty search, contrary to #4276.",
"disposition": "fixed",
"commit": "9d32900341a4abb6e36b9ec0549256f51a42afa6"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The changed fixture still depends on an ambient PATH and a temporary wrapper. The generic isolation prerequisite #4313 remains open, and the required passing hosted qualification for this head and its complete retention/native inventory is outstanding.",
"disposition": "filed",
"issue": "schlessera/brain-kit#4313"
}
]
} |
Independent reviewReviewed head 9d32900 against base 63bb400. Reviewer: agent. 2 findings: 0 fixed, 0 filed, 0 rejected, 2 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "9d32900341a4abb6e36b9ec0549256f51a42afa6",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:240 passes the entire Claude Grep display row to the 1,024-byte filename guard before parsing its path. I reproduced this with a marked notes/loom.md and 1,100 ASCII characters of match text. The detector throws, so the fallback recorder aborts the turn and loses the identifiable mark."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:182 still launches the installed SDK with environment overrides alone. The changed fixture has no selective OS mounts for its wrapper and marker files. The #4313 boundary is still pending, and this head lacks the passing hosted retention qualification required by #4274."
}
]
} |
Independent reviewReviewed head 9d32900 against base 63bb400. Reviewer: agent. 2 findings: 1 fixed, 1 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "9d32900341a4abb6e36b9ec0549256f51a42afa6",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:240 passes the entire Claude Grep display row to the 1,024-byte filename guard before parsing its path. I reproduced this with a marked notes/loom.md and 1,100 ASCII characters of match text. The detector throws, so the fallback recorder aborts the turn and loses the identifiable mark.",
"disposition": "fixed",
"commit": "899b6ff90e40ec7359d1fe9bfa0c3a40167be3a0"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:182 still launches the installed SDK with environment overrides alone. The changed fixture has no selective OS mounts for its wrapper and marker files. The #4313 boundary is still pending, and this head lacks the passing hosted retention qualification required by #4274.",
"disposition": "filed",
"issue": "schlessera/brain-kit#4313"
}
]
} |
Independent reviewReviewed head 899b6ff against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "899b6ff90e40ec7359d1fe9bfa0c3a40167be3a0",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:290 — A malformed Grep response with mode equal to {\"toString\":null} throws during String(parsed.mode). I reproduced this with a valid marked filename in the same response. The collector loses both the explicit mark and the unknown-remainder signal because the parser never returns them."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:244 — The display fallback discards every row after 256 before checking literal filenames. I reproduced a Grep result with 256 ordinary rows followed by one marked filename. It returned only legacy_unknown, losing the independent user_marked occurrence even though the output was below the byte limit."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:212 — The unconditional 255-signal cutoff drops the 256th known signal even when no remainder exists. A complete Grep result with head_limit 0 and exactly 256 distinct marked files records 255 marks and a spurious legacy_unknown. The previous bound admitted all 256."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The changed retention fixture still passes the wrapper PATH and USE_BUILTIN_RIPGREP directly to the SDK query. This head lacks the selective fixture mounts and generic qualified OS boundary required by #4274. Its prerequisite #4313 is still open."
}
]
} |
Independent reviewReviewed head 899b6ff against base 63bb400. Reviewer: agent. 4 findings: 3 fixed, 1 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "899b6ff90e40ec7359d1fe9bfa0c3a40167be3a0",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:290 — A malformed Grep response with mode equal to {\"toString\":null} throws during String(parsed.mode). I reproduced this with a valid marked filename in the same response. The collector loses both the explicit mark and the unknown-remainder signal because the parser never returns them.",
"disposition": "fixed",
"commit": "77b363d63049e7d9dddd988efb741ff6320d9a05"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:244 — The display fallback discards every row after 256 before checking literal filenames. I reproduced a Grep result with 256 ordinary rows followed by one marked filename. It returned only legacy_unknown, losing the independent user_marked occurrence even though the output was below the byte limit.",
"disposition": "fixed",
"commit": "77b363d63049e7d9dddd988efb741ff6320d9a05"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:212 — The unconditional 255-signal cutoff drops the 256th known signal even when no remainder exists. A complete Grep result with head_limit 0 and exactly 256 distinct marked files records 255 marks and a spurious legacy_unknown. The previous bound admitted all 256.",
"disposition": "fixed",
"commit": "77b363d63049e7d9dddd988efb741ff6320d9a05"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The changed retention fixture still passes the wrapper PATH and USE_BUILTIN_RIPGREP directly to the SDK query. This head lacks the selective fixture mounts and generic qualified OS boundary required by #4274. Its prerequisite #4313 is still open.",
"disposition": "filed",
"issue": "schlessera/brain-kit#4313"
}
]
} |
Independent reviewReviewed head 77b363d against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "77b363d63049e7d9dddd988efb741ff6320d9a05",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/governance/safety-collector.ts:125 — Input deduplication ignores the signal source. A WebSearch query literally equal to `unknown_remainder` has the same detector and key as the synthetic overflow signal. If another query exceeds 2048 bytes, the collector records the first query and silently drops the required legacy_unknown occurrence."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:207 — Clipping serialized JSON before parsing loses identifiable filenames. A structured Grep result containing one marked filename and a content field over 1 MiB becomes invalid JSON at the cutoff. The collector records only legacy_unknown even when the complete filenames array precedes the cutoff."
},
{
"summary": "packages/ui-backend-pi/src/file-tools.ts:76 — The nonfatal UTF-8 decoder replaces invalid filename bytes with U+FFFD before lookup. Two distinct POSIX filenames can therefore produce the same framed path and be deduplicated while the search reports complete evidence. Decoding loss needs to retain an unknown remainder."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The changed retention fixture still passes the wrapper PATH and USE_BUILTIN_RIPGREP directly to the SDK query. This head lacks the selective fixture mounts through the qualified OS boundary required by #4274, and its hosted checks show no passing retention qualification."
}
]
} |
Independent reviewReviewed head 77b363d against base 63bb400. Reviewer: agent. 4 findings: 3 fixed, 1 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "77b363d63049e7d9dddd988efb741ff6320d9a05",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/governance/safety-collector.ts:125 — Input deduplication ignores the signal source. A WebSearch query literally equal to `unknown_remainder` has the same detector and key as the synthetic overflow signal. If another query exceeds 2048 bytes, the collector records the first query and silently drops the required legacy_unknown occurrence.",
"disposition": "fixed",
"commit": "dedbb88daad818400cf919e5762630b45a8be292"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:207 — Clipping serialized JSON before parsing loses identifiable filenames. A structured Grep result containing one marked filename and a content field over 1 MiB becomes invalid JSON at the cutoff. The collector records only legacy_unknown even when the complete filenames array precedes the cutoff.",
"disposition": "fixed",
"commit": "dedbb88daad818400cf919e5762630b45a8be292"
},
{
"summary": "packages/ui-backend-pi/src/file-tools.ts:76 — The nonfatal UTF-8 decoder replaces invalid filename bytes with U+FFFD before lookup. Two distinct POSIX filenames can therefore produce the same framed path and be deduplicated while the search reports complete evidence. Decoding loss needs to retain an unknown remainder.",
"disposition": "fixed",
"commit": "dedbb88daad818400cf919e5762630b45a8be292"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The changed retention fixture still passes the wrapper PATH and USE_BUILTIN_RIPGREP directly to the SDK query. This head lacks the selective fixture mounts through the qualified OS boundary required by #4274, and its hosted checks show no passing retention qualification.",
"disposition": "filed",
"issue": "schlessera/brain-kit#4313"
}
]
} |
Independent reviewReviewed head dedbb88 against base 63bb400. Reviewer: agent. 2 findings: 0 fixed, 0 filed, 0 rejected, 2 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "dedbb88daad818400cf919e5762630b45a8be292",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:221 — If the 1 MiB cutoff falls inside `filenames`, the parser discards every complete filename earlier in that array. I reproduced this with a marked workspace file as the first entry. The detector returned only `legacy_unknown`, losing both `workspace_read` and `user_marked` despite the full path fitting inside the budget."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:182 — The changed retention fixture still calls the installed SDK directly and passes the host PATH. The positive invocation assertions are present, but the fixture lacks the qualified OS boundary and selective mounts required by #4274. Its prerequisite #4313 remains open at this head."
}
]
} |
Independent reviewReviewed head dedbb88 against base 63bb400. Reviewer: agent. 2 findings: 1 fixed, 1 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "dedbb88daad818400cf919e5762630b45a8be292",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:221 — If the 1 MiB cutoff falls inside `filenames`, the parser discards every complete filename earlier in that array. I reproduced this with a marked workspace file as the first entry. The detector returned only `legacy_unknown`, losing both `workspace_read` and `user_marked` despite the full path fitting inside the budget.",
"disposition": "fixed",
"commit": "1274df21b069d2833cd51a708e59f5d5635a4b0a"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:182 — The changed retention fixture still calls the installed SDK directly and passes the host PATH. The positive invocation assertions are present, but the fixture lacks the qualified OS boundary and selective mounts required by #4274. Its prerequisite #4313 remains open at this head.",
"disposition": "filed",
"issue": "schlessera/brain-kit#4313"
}
]
} |
Independent reviewReviewed head 1274df2 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "1274df21b069d2833cd51a708e59f5d5635a4b0a",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:363 — The installed Claude runtime emits numFiles: 0 and filenames: [] in content mode even for directory matches. A complete, unambiguous row such as notes/loom.md:1:sirens therefore always adds legacy_unknown and restricts an ordinary chat."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:342 — In count mode the installed Claude runtime returns filenames: [] and sets numFiles to the number of files with matches. Comparing those values marks every successful nonempty count as incomplete, even when the returned paths and counts account for all matches."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:265 — Claude renders numbered context rows as path-N-text. The colon-only parser misses the path when pagination returns a context row without its matching row. A marked file then contributes only legacy_unknown and loses its independent user_marked occurrence."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:282 — A truncated JSON result below the 1 MiB budget discards fully decoded filenames before the cut. For example, a Glob payload ending immediately after the closing quote of a marked filename yields only legacy_unknown. The partial-field parser already preserves that same filename when the truncation exceeds the byte budget."
}
]
} |
Independent reviewReviewed head 1274df2 against base 63bb400. Reviewer: agent. 4 findings: 4 fixed, 0 filed, 0 rejected, 0 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "1274df21b069d2833cd51a708e59f5d5635a4b0a",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:363 — The installed Claude runtime emits numFiles: 0 and filenames: [] in content mode even for directory matches. A complete, unambiguous row such as notes/loom.md:1:sirens therefore always adds legacy_unknown and restricts an ordinary chat.",
"disposition": "fixed",
"commit": "39aba90ff1c093ceee99e43e6066ea1c665452d2"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:342 — In count mode the installed Claude runtime returns filenames: [] and sets numFiles to the number of files with matches. Comparing those values marks every successful nonempty count as incomplete, even when the returned paths and counts account for all matches.",
"disposition": "fixed",
"commit": "39aba90ff1c093ceee99e43e6066ea1c665452d2"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:265 — Claude renders numbered context rows as path-N-text. The colon-only parser misses the path when pagination returns a context row without its matching row. A marked file then contributes only legacy_unknown and loses its independent user_marked occurrence.",
"disposition": "fixed",
"commit": "39aba90ff1c093ceee99e43e6066ea1c665452d2"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:282 — A truncated JSON result below the 1 MiB budget discards fully decoded filenames before the cut. For example, a Glob payload ending immediately after the closing quote of a marked filename yields only legacy_unknown. The partial-field parser already preserves that same filename when the truncation exceeds the byte budget.",
"disposition": "fixed",
"commit": "39aba90ff1c093ceee99e43e6066ea1c665452d2"
}
]
} |
Independent reviewReviewed head 39aba90 against base 63bb400. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "39aba90ff1c093ceee99e43e6066ea1c665452d2",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:266 — In Claude Grep content mode without context flags, the numbered-row regex still treats `-N-` as a delimiter and then sets unknown. The installed CLI only emits `-` rows when context is requested. A complete row such as `notes/loom.md:3:due 2026-11-20`, or a file named `notes/2026-11-20-standup.md`, therefore adds legacy_unknown and restricts an ordinary chat. Main returns no signal for both; reproduced with the parser at this head."
},
{
"summary": "packages/ui-server/src/brain/turn-extraction.ts:188 — `observe` sets `current.complete=false` whenever outputStatus.complete is false, for every tool. The Pi worker now sends `{complete:false}` for any errored or structured result of any tool (packages/ui-backend-pi/src/worker-protocol.ts:107, tool-safety.ts:72). One failed bash or read_file call therefore withholds extraction relaxation for the rest of the session. Only incomplete search evidence was meant to do this."
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The new same-tool native case and the changed fixture have never passed anywhere: the last local receipt was 0 pass / 9 fail, and the hosted runtime and runtime_host jobs are skipped at this head. #4274 requires passing hosted retention qualification for the final head and routing through the #4313 boundary, which is still open (PR #4314 unmerged). Unresolved since the round at 69273708b."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:266 — In Claude Grep content mode, any matched text containing `:N:` yields a second filename candidate and adds legacy_unknown, e.g. `notes/loom.md:3:sails at 10:30:00`. Main returns no signal. Every candidate is still checked for marks and areas, so nothing is lost, but ordinary content searches over lines with clock times restrict the chat."
}
]
} |
|
Binding final-review triage at [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:266 \u2014 In Claude Grep content mode without context flags, the numbered-row regex still treats `-N-` as a delimiter and then sets unknown. The installed CLI only emits `-` rows when context is requested. A complete row such as `notes/loom.md:3:due 2026-11-20`, or a file named `notes/2026-11-20-standup.md`, therefore adds legacy_unknown and restricts an ordinary chat. Main returns no signal for both; reproduced with the parser at this head.",
"verdict": "fix"
},
{
"summary": "packages/ui-server/src/brain/turn-extraction.ts:188 \u2014 `observe` sets `current.complete=false` whenever outputStatus.complete is false, for every tool. The Pi worker now sends `{complete:false}` for any errored or structured result of any tool (packages/ui-backend-pi/src/worker-protocol.ts:107, tool-safety.ts:72). One failed bash or read_file call therefore withholds extraction relaxation for the rest of the session. Only incomplete search evidence was meant to do this.",
"verdict": "fix"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 \u2014 The new same-tool native case and the changed fixture have never passed anywhere: the last local receipt was 0 pass / 9 fail, and the hosted runtime and runtime_host jobs are skipped at this head. #4274 requires passing hosted retention qualification for the final head and routing through the #4313 boundary, which is still open (PR #4314 unmerged). Unresolved since the round at 69273708b.",
"verdict": "fix"
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:266 \u2014 In Claude Grep content mode, any matched text containing `:N:` yields a second filename candidate and adds legacy_unknown, e.g. `notes/loom.md:3:sails at 10:30:00`. Main returns no signal. Every candidate is still checked for marks and areas, so nothing is lost, but ordinary content searches over lines with clock times restrict the chat.",
"verdict": "defer"
}
] |
Independent reviewReviewed head 39aba90 against base 63bb400. Reviewer: agent. 4 findings: 2 fixed, 1 filed, 0 rejected, 1 without a disposition. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "39aba90ff1c093ceee99e43e6066ea1c665452d2",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "findings",
"findings": [
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:266 — In Claude Grep content mode without context flags, the numbered-row regex still treats `-N-` as a delimiter and then sets unknown. The installed CLI only emits `-` rows when context is requested. A complete row such as `notes/loom.md:3:due 2026-11-20`, or a file named `notes/2026-11-20-standup.md`, therefore adds legacy_unknown and restricts an ordinary chat. Main returns no signal for both; reproduced with the parser at this head.",
"disposition": "fixed",
"commit": "efb101f842eb9c2c3899fcf4070390c84488e1a4"
},
{
"summary": "packages/ui-server/src/brain/turn-extraction.ts:188 — `observe` sets `current.complete=false` whenever outputStatus.complete is false, for every tool. The Pi worker now sends `{complete:false}` for any errored or structured result of any tool (packages/ui-backend-pi/src/worker-protocol.ts:107, tool-safety.ts:72). One failed bash or read_file call therefore withholds extraction relaxation for the rest of the session. Only incomplete search evidence was meant to do this.",
"disposition": "fixed",
"commit": "efb101f842eb9c2c3899fcf4070390c84488e1a4"
},
{
"summary": "packages/ui-server/tests/safety-result-retention.test.ts:184 — The new same-tool native case and the changed fixture have never passed anywhere: the last local receipt was 0 pass / 9 fail, and the hosted runtime and runtime_host jobs are skipped at this head. #4274 requires passing hosted retention qualification for the final head and routing through the #4313 boundary, which is still open (PR #4314 unmerged). Unresolved since the round at 69273708b."
},
{
"summary": "packages/ui-server/src/activity/ingestion-taint.ts:266 — In Claude Grep content mode, any matched text containing `:N:` yields a second filename candidate and adds legacy_unknown, e.g. `notes/loom.md:3:sails at 10:30:00`. Main returns no signal. Every candidate is still checked for marks and areas, so nothing is lost, but ordinary content searches over lines with clock times restrict the chat.",
"disposition": "filed",
"issue": "schlessera/brain-kit#4347"
}
]
} |
Independent reviewReviewed head efb101f against base 63bb400. Reviewer: agent. No findings. {
"version": 1,
"kind": "brain-review-receipt",
"pr": 4312,
"head": "efb101f842eb9c2c3899fcf4070390c84488e1a4",
"base": "63bb400b31403ee319926d38e223711a9bf0e7e1",
"reviewer": "agent",
"outcome": "no-findings",
"findings": []
} |
Part of #4274
Closes #4275
Closes #4276
Concurrent calls reusing one tool-use ID could let one result discharge both result obligations. Search parsing also lost marked filenames at colon/newline boundaries and treated incomplete output as healthy evidence.
The collector now retains ambiguous delivery and a durable result gap while preserving one-call multi-hook/input-revision behavior. Search signals are additive: every identifiable filename is checked independently, while malformed, ambiguous, omitted or inconsistent evidence adds an unknown remainder. Claude outputs validate against installed Glob/Grep schemas and admitted mode, line-number and pagination selectors. Pi's shipped grep uses
-Zinternally and retains exact filename framing in host-only result details. Provider-visible text keeps the old trim-then-clip pipeline and advertisedpath:line:contentbytes. Hidden separators do not consume its character budget. The worker requires a frame covering the exact delivered prefix; if inconsistent, it parses delivered text restrictively rather than discarding its identifiable paths. Display-only result text cannot verify an empty search. The extraction bridge forwards the full typed result tuple, observes completeness itself, and withholds relaxation on incomplete evidence. Pi grep without process status is unknown. Status identity uses canonical key order; host frames are independently byte-bounded. Only the original, complete single-text empty sentinel is empty. Grep now forces filename prefixes with-H, captures exit/stderr/truncation, and carries explicit host-only status through the real after-tool hook and worker RPC. Partial results retain known marks alongside unknown coverage; status never changes text to encode completeness.The native same-ID proof now requires a
tool_search_outputoccurrence, two logical admissions, a held second search and exactly one delivered result. A request-specific filesystem gate prevents the second search from completing until teardown; it does not assume onergprocess per tool. ReferenceError setup regressions are corrected. #4271's causal-admission SDK contract work remains a separate PR. This PR adds the approved optionalInputSafetyOutputStatusargument, package API contract documentation, a regenerated API report and an SDK minor changeset; absent metadata preserves existing callback behavior, while missing Pi process status is restrictive.Receipt correction
Earlier typecheck and test receipts did not cover amended head
accf202cf39c871f9ad4697d1df3eb2df761f546. The native fixture changed after typecheck began, and carrying that result forward was incorrect. The 228 passing tests excluded the retention file and were working-tree debug proof, not qualification of that amended head.Explicit complete runs before the sixth-round fixes produced 0 pass / 9 fail for the retention file and 228 pass / 9 fail for the full eight-file focused set. Two cases threw ReferenceError; seven native runtime premises were unqualified. A fresh typecheck failed TS2304. These remain failed historical receipts.
The native investigation found an offline-harness escape tracked by security p1 #4313. No local installed-native Claude tests run on the affected host until #4313 lands. Native retention qualification is blocked by #4313 / PR #4314. These tests must use its enforcing guard once it lands; a temporary HOME and loopback base URL are insufficient. This PR stays draft until that dependency is delivered and the guarded suite qualifies. Local native failures are never counted as passes. #4313 is milestone 0.45.0 and blocks #4274; a separate worker owns its correction.
Current proof
Exact head:
efb101f842eb9c2c3899fcf4070390c84488e1a4. Final receipts run after the last edit and restored mutations; prior receipts describe their named heads only.Normal Claude collection uses the SDK's structured
PostToolUse.tool_response. Installed SDK 0.3.293 also exposes the full per-tool Output asSDKUserMessage.tool_use_result(sdk.d.ts:6280-6293), distinct from display text. The real hook regression records structured numeric/workspace filenames without unknown. The host startup wiring connects collector readiness tosetSafetyHooked, disabling display ingestion. The display-only fallback runs only while structured collection is unavailable or not ready. It never parses filename text as JSON, checks literal rows and marked adjacent-line joins, and retains unknown for all nonempty unframed text. Exactly empty fallback text has no boundary ambiguity. This does not restrict every normal Claude search.Pi's shipped grep now carries a host-only raw-byte emptiness proof. Only exit 1, zero stdout bytes and empty stderr qualifies as empty. Literal nonempty stdout saying
No matches.cannot mint that proof; missing or false proof is restrictive. Public output-status fields and provider-visible bytes remain unchanged.NODE_OPTIONS=--max-old-space-size=6144; preflight receipt follows below.2754ed582798fc00ac0999f1dfd6bcddd114cd6aplus new tests: the literal JSON/numeric/newline filename table failed 0 pass / 3 fail.Native qualification dependency
At reviewed head
8cb9b46e063bd3c5eb3dfaf5d7e97e7997dcd28d, CI run 44808059517 suppressed runtime/runtime_host by draft selection. The automatic heavy-feedback run 44808059452 was a pull_request supersede event, not workflow_dispatch, so its admission and native jobs did not run. Those successes prove no native execution. Earlier workflow-dispatch feedback: run 44841772891 atf49bb40649c9600961af89b16f73193a7c18328d. Feedback is not native qualification without the required guarded fixture.Blocked by #4313 (PR #4314). Keep this PR draft. Route the retention native tests through that guard once it lands, then require exact-head guarded native/runtime/provider-history results before candidate confirmation. The earlier feedback run 44801943144 at
69273708b42fec98858b4f6f3e99c7acb48ec6bawas cancelled while waiting for admission; it supplied no native qualification. No unsealed native result is proof.Guard containment
a genuine failed event commit fences its chat permanently and leaves the brain usableandindependent SQLite connections share the durable pending ceiling; the failure fences only its chat, both in the passing focused ledger suite.Checklist
#3596 remains open for the follow-up combined review.
Collisions
Historical local graph scan at
899b6ff90e40ec7359d1fe9bfa0c3a40167be3a0: closure overlaps; textual overlaps [{"prs": [4270, 4312], "paths": ["docs/integration-contract/package-api.md", "docs/plans/reviewable-session-safety.md"]}, {"prs": [4312, 4314], "paths": ["packages/ui-server/tests/safety-result-retention.test.ts"]}, {"prs": [4312, 4315], "paths": ["api-report/ui-sdk.txt", "docs/integration-contract.md", "docs/integration-contract/package-api.md", "packages/ui-backend-pi/src/file-tools.ts", "packages/ui-sdk/src/server/backend.ts", "packages/ui-sdk/src/server/index.ts", "packages/ui-server/src/governance/safety-collector.ts"]}, {"prs": [4312, 4317], "paths": ["packages/ui-backend-pi/src/tool-safety.ts", "packages/ui-backend-pi/src/worker-entry.ts", "packages/ui-backend-pi/src/worker-protocol.ts", "packages/ui-backend-pi/src/worker-rpc.ts"]}]. The scan reads the currently published PR diffs; the new local head is recorded above. No merge attempted or integration reservation taken.Latest detector correction
Filename guards apply to parsed paths, never full Grep content rows. Oversized or unparseable candidates retain unknown evidence instead of throwing; independent later marks survive. The detector contains no explicit throwing guards. Exact-head mutations and restored qualification are recorded below.
Previous heavy-feedback runs 44855012825 and 44855012817 were cancelled for admission starvation (#4328); they are not proof. New requests are serialized.
Verified Claude Grep modes and partial parsing
Historical head
39aba90ff1c093ceee99e43e6066ea1c665452d2: 452 pass / 0 fail across 15 focused files, one installed-Claude case filtered. Build, typecheck and preflight passed with the required 6144 MiB Node heap setting.The installed SDK 0.3.293 ships native CLI 2.1.293. Without executing it, the embedded
lno/pno/cDesource was read from@anthropic-ai/claude-agent-sdk-linux-x64/claude; code comments cite lines 1464467–1464477 and the constructor byte offsets. Content mode always reports numFiles=0 and filenames=[], with numLines/totalLines. Count mode leaves filenames empty and reports all matching-file/match totals. Files mode relates returned filenames to numFiles/totalFiles.cDeemits appliedLimit only when rows were omitted. The source preserves ':' match and '-' context delimiters, including the-n: falsepath.Completeness now follows those mode-specific relations. Ordinary and empty real-shape fixtures stay clean; omitted totals, unexplained count totals and context separators with no identified source stay unknown. Numbered/unnumbered context rows retain known paths under the same ambiguity rules. Every malformed JSON truncation uses the bounded partial-field/element parser, whether below or above 1 MiB; independently complete filename strings survive every cut. Pi text never goes through the Claude JSON fallback.
Finalized real-shape failing-first fixtures on reviewed
1274df21b069d2833cd51a708e59f5d5635a4b0a: 4 pass / 9 fail. The additional missing-total/separator counterexamples were 0 pass / 3 fail. At that historical head, mutations went red for content filename-count assumptions, count filename-array assumptions, colon-only context parsing, dropping partial arrays below the budget, and accepting missing completeness fields. All are restored before qualification. Older fixtures that fabricated non-native field relations were corrected to the verified constructors.Earlier round-19 checks started before the final completeness audit were superseded, stopped by verified owned PID/checkout, and are not qualification of this head. Changed citation anchors pass; unrelated repository-wide citation drift remains a release check. Native retention remains blocked by #4313 / PR #4314 and must use its selective OS fixture mounts. Keep this PR draft.
Historical mutation counts at
39aba90ff1c093ceee99e43e6066ea1c665452d2: content assumptions 0 pass / 1 fail; count assumptions 0 pass / 2 fail; colon-only context parsing 0 pass / 1 fail; under-budget truncation 0 pass / 1 fail; missing completeness fields 0 pass / 3 fail. All restored.{"version":1,"kind":"brain-check-pr-receipt","head":"efb101f842eb9c2c3899fcf4070390c84488e1a4","base":"origin/main","mode":"focused","startedAt":"2026-11-21T04:57:20.423Z","finishedAt":"2026-11-21T04:59:33.515Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":26209.571754000004},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":217.55340000000433},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":163.9469089999984},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":26.960457000001043},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":106449.922101}]}Binding final review
The final reviewer classified findings 1–3 as fix and finding 4 as defer. Context delimiters are parsed only when requested; failed non-search tools do not change search completeness. Colon-candidate disambiguation is filed to #4347 (p2, 0.45.0). #4274 stays open for routing the retention fixture through #4313 / PR #4314. No local installed-Claude run was performed. This PR remains draft; hosted runtime and runtime_host qualification is required at the final head.
Final head
efb101f842eb9c2c3899fcf4070390c84488e1a4: restored focused checks 456 pass / 0 fail, one installed-Claude test filtered. Mutations: hyphen parsing 11 pass / 2 fail; non-search completeness 0 pass / 2 fail, both on the intended assertions. Heavy feedback: https://github.com/schlessera/brain-kit/actions/runs/44868197090 (pending, not green).Final-head build, typecheck and
bun run check:pr --base origin/mainall passed after the last edit and restored mutations. Hosted runtime/runtime_host remain pending.