Repository navigation
Two owner-answer adds at once no longer collide, and three flaky tests get real fixes (GST-3084) - #4490
Merged
Conversation
…s get real fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Review-Finding: p1/specialist-batched#1 reader=testing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This was referenced Nov 18, 2026
Closed
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466) - An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481) - A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481) - `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470) - `revise --plan` with a different file now says the run follows that file. (#4470) - A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471) - The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460) - A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456) - A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451) - /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458) - A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458) - A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458) - A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473) - /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461) - /ship on Codex no longer stops at the test coverage audit. (#4489) - A cold first-use check before an app build reaches its owner (GST-3025). (#4465) - `skill_prefix=true` now survives updates when gbrain is installed. (#4454) - The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454) - `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454) - /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464) - /office-hours explains why it recommends a mode. (#4450) - /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463) - Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490) - A Captain can check an ask against the owner's earlier answers before sending it. (#4467) - `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488) - GitHub release notes now list every change in plain words, with a link to its pull request. (#4390) - gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442) - /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469) - /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472) - A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479) - The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457) - A security finding's location and reason no longer go into a PR body. (#4486) - The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487) - A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485) - A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452) - /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474) - A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440) - One queued record with a malformed path no longer stops artifacts sync for every project. (#4455) - A failed artifacts push stays reported until a push succeeds. (#4455) - The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455) - ### Tests (#4495) - A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495) - CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453) - Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447) - The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447) - Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484) - Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459) - Two /autoplan runs started in the same second no longer share a run id. (#4459) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recording the same owner answer from two processes at once no longer fails about one time in ten; the second add waits for the first to finish writing.
Why: this was a daily flaky-test repair, and the owner-answers "two processes adding at once" failure turned out to be a real race, not a flaky test.
Nothing to do: tests only change, except the 11 lines in
lib/owner-answers.ts.What changed
lib/owner-answers.ts, two races in a concurrent add. (1) The winner creates the row file withO_EXCLand then writes it, so the loser could read an empty file and reportOWNER_ANSWERS_CONFLICT. The loser now waits up to 2 s for the file to hold JSON before comparing; a row file that stays empty is still a conflict (new negative-control test). (2)storeEscapecalledrealpathand thenlstat, so a folder created by the other add between the two calls was refused as "a link that cannot be resolved". It now checks the folder exists first and only then resolves it. Publishing through a hard link was ruled out because the Capy Drive mount, where the record lives, refuses hard links.test/owner-answers.test.ts. The new "created but not yet written" test now waits for the writer process to say it has started before the timed add begins, so a slow Bun start on a busy runner can't use up the 2 s wait.test/sealed-stream.test.ts. The copied pre-fix helper judged git by exit status only. Under load Bun reports status 0 witherror: ENOBUFSand a truncated stdout when git exits before the overflow kill lands, so "a 4 KiB maxBuffer reproduces the refusal" stopped throwing. The helper now counts a spawn error as a failure.setDefaultTimeout(30_000), the same limit CI passes. Two cases run 3.0 to 3.4 s on a 4-core machine with plain git and 7 to 11.6 s through a wrapped git, so a bare localbun testtimed them out at Bun's 5 s default.Evidence
Why
Two people or agents recording the same owner answer at the same moment should both succeed. Before this change about one pair in ten got a conflict error for an answer that was identical, and three tests failed intermittently on loaded CI runners.
Blast radius
addAnsweris called only from thegstack-owner-answerscommand, so the blocking 2 s wait can't stall a long-running process (file read of every caller). A link that really can't be resolved is still refused, and a row with different words is still a conflict (unit tests, plus a 12-process concurrent add run on this branch: 1 written, 11 present, no conflict).Pre-Landing Review
One reviewer read the whole diff and found one test that could still flake: it raced the writer process's start against the 2 s wait. That test is fixed in this PR. A second reader looking for failure modes found three low-severity edge cases, all of which fail closed (an error, never a false success); they are listed below and left as notes. A second-model review (GPT-6.1 Sol) found nothing.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/owner-answers.ts:285If the first add's write fails after its exclusive create, writeExclusive deletes the file and the second add reports OWNER_ANSWERS_CONFLICT after 2 s although nothing is recorded (fails closed; pre-existing behaviour, Low, Blocks: no).lib/owner-answers.ts:272A writer held more than 2 s between create and write still yields a false conflict; a writer killed in that gap leaves an empty row that every later add reports as a conflict after 2 s (readStore lists it as a problem; Low, Blocks: no, INVESTIGATE).lib/owner-answers.ts:180A folder removed between lstat and realpath is still refused as an unresolvable link (fails closed, needs a concurrent delete; Low, Blocks: no).Exploratory QA
Two smoke probes on an isolated temporary record: the owner-answers test file (28 pass, rerun after the test fix) and 12 processes adding the same answer at once (1 written, 11 present, 1 row stored, no conflict). Verdict: pass. Not probed directly: a folder deleted between the two folder checks.
Documentation
Status: current. No documentation edits were needed.
Scope: release diff 3ecd716..3b490e7 on
owner-answer-adds-no-longer-collide:lib/owner-answers.ts(a concurrent identicaladdwaits up to 2 s for the first writer; the folder check looks for a folder before resolving it), three flaky-test fixes and one changelog fragment. No staged, unstaged or new files.Documentation health:
docs/owner-answers.md: current. Conflict, same-answer-is-one-file, uncertain-on-empty-file and link-refusal behavior are all still accurate.changelog.d/owner-answer-adds-no-longer-collide.md: current, matches the code.README.md: current, nothing affected.Coverage debt: no new public commands, flags or environment variables. Minor reference gap:
docs/owner-answers.mddoes not say that a second identicaladdwaits up to 2 seconds for a concurrent writer before reporting a conflict.Diagram drift: none.
Tests
bun test test/owner-answers.test.ts: 28 pass, 0 fail.Agent notes
Agent notes
Timeout files: test/gstack-ship-receipt.test.ts and test/gstack-ship-receipt-docs.test.ts.
Daily flaky-fix pass 2026-11-18 (GSTA-618, GST-3084). Ledger: handoffs/flaky-ledger.md. Failed runs: Free Tests 44227839730 shard 10 (#4474 @ e509b4f) and 44229407076 shard 8 (retry passed) for owner-answers.
Refs GST-3084
Approvals
No approvals recorded for branch owner-answer-adds-no-longer-collide.
Plan: exempt: flaky
Plan check: exempt flaky
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=3 fixed=1 scope=frozen dispatches=1
Gate edits: none detected (6 listed, 3 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: completed (host subagent, openai/gpt-6.1-sol), VERDICT: CLEAN
Tests ran: bun run test 1698 (files, carried from CI run 44329123233/1)