Repository navigation
test(logging): isolate prefix cases from cached inode - #173376
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper autofix |
|
|
|
Codex review: needs maintainer review before merge. What this changesThis PR gives independent log-tail prefix test cases separate temporary log files. Example: The inherited-prefix case follows the non-inherited case and reads “following value”.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a concrete fixture failure while preserving the accepted cache contract and every redaction assertion; no introduced defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Gateway logs.tail RPC reads the configured log file through the shared tail reader, which carries redaction context between cursor polls and returns masked lines with byte cursors. flowchart LR
A[Prefix fixtures] --> B[Temporary log files]
A --> C[Gateway logs.tail RPC]
C --> D[Configured tail reader]
B --> D
D --> E[Redaction anchor]
D --> F[Masked lines and cursor]
Technical reviewBest possible solution: Land the isolated fixture repair after the repository’s required checks permit merging. Do we have a high-confidence way to reproduce the issue? The shared-file loop and cache reuse condition establish the fixture failure path, corroborated by the author’s failing baseline report; no tests were executed during this read-only review. Is this the best way to solve the issue? Separate files are the appropriate small repair because the cases are independent and same-inode rewrites are explicitly outside the cache’s accepted contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 071c4ad0a4e1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +4. Total +4 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 15, 2026, 2:31 PM ET / 18:31 UTC. |
(cherry picked from commit 40806cf)
…law#173376) (cherry picked from commit 40806cf) (cherry picked from commit 34ac9b8) Co-authored-by: RomneyDa <[email protected]>
…ns in gateway lane FRV tests (#187589) * fix(sessions): keep malformed rows out of the legacy transcript locator projection The #181247 backport (08ee066) adapted the main change for the release branch's legacy sessionFile locator by projecting json_extract(entry_json, '$.sessionFile') on every selected row. SQLite raises 'malformed JSON' for an unreadable entry_json before parseSessionEntryJson can apply its skip/reject policy, so ordinary selected listings and gateway lookups failed with a raw SQLite error. Project the locator only for transcript selections and only for valid JSON rows. Release-only: main retired the sessionFile locator. * test(logging): isolate log-tail prefix cases from cached inode (#173376) (cherry picked from commit 40806cf) * test(gateway): realign sessions_send owner continuation to the #181373 backport 9b8ee9c (#181373 backport) adopts timed sessions_send children into the requester turn and changes the inline wait to waitForAgentRunReply. The backport dropped a8a3680's matching fixture changes, so the test spied on the old SessionFollowupCompletion.take and waited forever. Apply main's fixture hunk (observe waitForAgentRunReply and registry persistence). The release branch has no session-controller liveness check (#175837), so a claimed result is handed back only by the requester run's settlement; the synthetic original run now performs the settleRequesterRun call its embedded runner makes on completion. Adapted from a8a3680 * test(agents): keep six-outcome settle fixture undelivered after consumed-cohort backport The 2f7589a backport of #181260 filters delivered child findings from settle wakes (needsRequesterSettleFindings). On main, #178104 moved the shared makeSettledChild default to pending delivery; the release fixture still defaults to delivered, so this case lost every finding. Mark its children pending, as the backport did for its other undelivered fixtures. * test(gateway): keep progress-only settle recovery undelivered after #181260 backport Backport 2f7589a dropped the source commit's fixture change because main had moved the recovery case into server.subagent-settle-replay-recovery.test-support.ts. Apply the same 'progress only' pending-delivery setup to the inline release copy. (adapted from commit 535989c) * test(agents): keep private settle policy fixtures undelivered after #181260 backport Backport 2f7589a filters delivered child findings from settle wakes. On main, #178104 moved the shared fixture default to pending and renamed these cases to pending pairs; the release fixture still defaults to delivered, so the private marker was filtered. Mark the children pending. * test(agents): mock retireRequesterFollowupAuthority in settle retry fixture Backport 9b8ee9c (#181373) made execution cleanup call retireRequesterFollowupAuthority. This release-only fixture mocks requester-cron-authority.js without that export, so the retry wake threw and warned. Main no longer has this mock. * fix(subagents): keep queued collectors out of operator completion custody The release adaptation 4643f86 of #181373 started capturing the operator continuation context for every spawn so collectors also record their original requester source. It dropped the collect guard on binding completion authority, so a queued collector retained an operator source hold after its parent completed or stopped. Main binds only non-collect runs (authority && !registerParams.collect); restore that guard here and keep completionAuthorityRequired aligned with it. * test(agents): mark settle retry cron-authority mock as isolation The added retireRequesterFollowupAuthority export changed the grandfathered factory hash. Name the isolation reason and prune the stale baseline entry. --------- Co-authored-by: Patrick Erichsen <[email protected]>
What Problem This Solves
A new log-tail cursor cache assumes append-or-rotate log files. The existing prefix test overwrote the same inode between independent cases, so the second case reused stale cached state and failed on current main. Each case now uses its own log file. This is a standalone main-CI repair; no Claw or Lobster files are changed.
Evidence
8958e91f5e0: the focused test failed atsrc/gateway/server.logs-tail.test.ts:231(expected ["following value"], received ["…redacted…"]).pnpm test src/gateway/server.logs-tail.test.ts --maxWorkers=1passed 6/6.pnpm exec oxfmt --check src/gateway/server.logs-tail.test.tsandgit diff --checkpassed.