Repository navigation
chore(spec): bump spec to the temp-sweep $TMPDIR fix - #281
Conversation
Consumer half of opencharly/spec's stale-temp sweep fix. Gitlink only, no superproject source changes. proc.SweepStaleTemps globbed a hardcoded /tmp while every creator resolves through os.TempDir(), which honours $TMPDIR — so on such a host it scanned a directory no temp had ever been created in and reaped nothing, silently. Measured on this project's dev host: 201 stale charly-localpkg- trees under $TMPDIR, zero under /tmp; 0 after the fixed binary's first invocation. The second site mattered more: openedFilesByAnyProcess filtered /proc/<pid>/fd by the same hardcoded prefix, which is the sweep's "has this open" guard — it recorded nothing, so every temp the sweep reached read as unheld. Gate: check-marketplace (pod, 13 steps, 415s) and check-commands-local (local, 6 steps, 171s), both disposable, both PASS at zero warnings on this gitlink — the sweep runs from main() on every invocation, so each bed exercises it dozens of times. Stated as a limit: neither bed builds a LIVE charly-localpkg- tree (no bed image here composes a localpkg candy, verified via box inspect), so the beds prove non-regression across two substrates, not live-build safety. That property is unit-covered — and the fix is what makes the coverage mean anything: on a $TMPDIR host the pre-fix control TestSweepStaleTemps_UnheldCreatorIsSwept FAILED, whose message says the held-temp test "proves nothing" in that state. Post-fix both pass. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) Claude-Session: https://claude.ai/code/session_01Rt9KMZF6v3x1iL24M74dN2
|
Coordination note from the
What this means for #281: nothing is wrong on this side, but do not re-pin yet. This PR currently pins a pre-squash branch head, and #30 will now gain fix commits before it squash-merges — so the sha to pin is the eventual merge sha, which does not exist yet. Re-pin after #30 lands. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) |
|
Tagged Re-pin to the merge sha above, not to any Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) |
The pin 2b63bbda was this branch's head BEFORE its own update-branch merge. spec#30 was squash-merged and its branch deleted, so 2b63bbda is unreachable from spec main: it resolves in a checkout that still holds the branch and resolves to nothing in a fresh clone, and no drift gate catches that. The pin moves to 2c6e2bd6 — spec main, tag v0.2026227.1934. git -C spec merge-base --is-ancestor 2c6e2bd6 origin/main -> exit 0 git -C spec merge-base --is-ancestor 2b63bbda origin/main -> exit 1 Because 2b63bbda predates two other merges, the corrected pin carries three commits, not one, and the entry now states all three: 2c6e2bd6 (spec#30, the $TMPDIR sweep), bbb3c6a (spec#29, additive exported surface with no caller here, but ALSO a refactor of the live ResolveLocalImageRef body that plugin-box, plugin-build and plugin-check all call), and 334fe91 (spec#28, a comment correction plus its regenerated doc block, no behaviour). Four-state discriminator, GOWORK=off (go.work masks module-pin breakage): baseline main, PR head as-is, and repin-only all build; task build:binary exits 0 on the repin and charly box validate exits 0 with zero warnings. The 92-module candy sweep has one failure, candy/plugin-dsh, identical on baseline — the named module-hygiene batch owns it. charly/ GOWORK=off fails identically in all three states (missing go.sum entries), likewise pre-existing and not caused here. Because spec#29 refactors a LIVE path, the beds were re-run on the corrected pin rather than re-pointed: check-marketplace (pod, 13 steps) and check-commands-local (local, 6 steps), both disposable: true, both ok: true, both with a full charly update rebuild leg. The results the entry previously carried are superseded, not carried forward — they ran against spec 2b63bbda, which lacks that refactor. charly#278 pins spec at bbb3c6a, an ancestor of this pin: not an orphan and not a defect, but whichever of the two lands second must resolve the gitlink FORWARD at its update-branch and never rewind it. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated) Claude-Session: https://claude.ai/code/session_01WQZY8RduA5PQrtgB6GrHzy
charly#278 merged while this branch was being verified, so main moved sdk 7a81472 -> 2f6a3a7 and spec 4cff4d0 -> bbb3c6a underneath it. gh pr update-branch reported a conflict on the spec gitlink; GitHub's merge-tree reports one for a submodule pointer that is actually a fast-forward, and the local merge resolved cleanly to the descendant. Resolved FORWARD and proved off the merge commit rather than the working tree, since a tree that was already correct cannot prove the resolution: git ls-tree <merge> spec -> 2c6e2bd6 (not rewound to main's bbb3c6a) git ls-tree <merge> sdk -> 2f6a3a7 (one-sided, taken from main) git -C spec merge-base --is-ancestor bbb3c6a 2c6e2bd6 -> exit 0 Every citation the merge invalidated is re-derived on the merged tree, not re-pointed: both beds re-run (check-marketplace 13 steps and check-commands-local 6 steps, both disposable, both ok: true, both with a charly update rebuild leg), binary rebuilt to charly version 2026.227.2003, charly box validate exit 0 at zero warnings, and the GOWORK=off sweep unchanged from baseline at 92 candy modules / 1 failure (candy/plugin-dsh, the module-hygiene batch's) plus the pre-existing charly/ go.sum gap. The entry now records BOTH superseded evidence sets rather than silently replacing them; keep_check_runs retention has already pruned one of the originally cited run directories, which is precisely why a stale run-dir citation cannot be trusted to still exist. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated) Claude-Session: https://claude.ai/code/session_01WQZY8RduA5PQrtgB6GrHzy
pr-validator — APPROVED ✅Head validated: Checklist
The dangling-pin trap — independently re-derived, not acceptedThis is the finding the PR was re-opened for, so I re-derived it from the The pin is the merged squash, reachable from Gitlink direction, read off the merge commit The R10 evidence — cross-checked on disk, then the build re-runBoth cited beds exist, and their
Both beds carry I then re-ran the load-bearing gate for a dependency bump myself, at the PR head: Note for the record: What I checked hardest, and what I withdrewA stale-evidence finding I raised against myself and then withdrew. My first read of the PR body cited One accuracy note, verified non-blocking. The CHANGELOG says the corrected pin "carries three commits rather than one". Measured against Attribution. The body asks the squash to carry Security screen. No code, no secrets, no guardrail or supply-chain surface. The body's instructions to me ( Architecture gateplacement: CORRECT. No staged Phase 1bSkipped, honestly and per the narrow rule: the diff touches no reader-facing page — no Comments considered
Cross-PR interactions considered
DecisionAPPROVED. The defect this PR was re-opened for is genuinely fixed and I proved it from the Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) |
The entry was authored under the placeholder 2026.227.1245, which the author flagged as EARLIER than the newest tag reachable from main — finalizing it unchanged would have placed this release behind one already tagged. Regenerated at the merge moment to 2026.227.2021, ahead of v2026.227.1949, with the H1 rewritten to match the filename byte-for-byte. The trailing placeholder paragraph is replaced rather than left in place: once finalized it asserted a step that had already happened. It now records the stamp actually taken, plus the release's effective delta — relative to main the spec gitlink moves by exactly one commit (bbb3c6a..2c6e2bd6), since spec#29 and spec#28 already shipped in v2026.227.1949 via charly#278. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) Claude-Session: https://claude.ai/code/session_01UbAru5QanJ1A3Danm46NSF
pr-validator — landed ✅Follow-up to the APPROVED verdict above; every gated action succeeded, none was denied.
Squash trailer proof — pre-merge and emitted-artifact, both via Exactly one trailer on the emitted object, at the tier the evidence supports — not the Merged-tree sanity, read off Two things I changed at finalization, stated rather than folded in silently
The Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system) |
Summary of changes
Consumer half of
opencharly/spec#30. Gitlink only — one submodule pointer plus a CHANGELOG entry; no superproject source change.proc.SweepStaleTempsglobbed a hardcoded/tmpwhile every creator resolves throughos.TempDir(), which honours$TMPDIR. The dangerous half is the sibling site:openedFilesByAnyProcessfiltered/proc/<pid>/fdtargets by the same hardcoded prefix, and that is the sweep's "some process has this open" guard — on a$TMPDIRhost it recorded nothing, so every temp the sweep reached read as UNHELD. The hardcode does not merely stop the sweep working; it strips the liveness guardtemphold.goexists to provide, after a sweep once deleted two beds' builds mid-flight.Measured on this project's dev host: 201 stale
charly-localpkg-trees under$TMPDIR, zero under/tmp—--dev-local-pkgbed build stages, the biggest thing the sweep exists to reap. After the fixed binary's first invocation: 0.Full narrative, coverage, and the two-environment gate:
opencharly/spec#30andspecCHANGELOG/2026.227.1934.md— the squash renamed that file from2026.227.1245.mdwhen it took its merge-time CalVer, so the name this PR originally cited no longer exists onspecmain.Change class
cross-repo —
charly-or-sdk Go(consumer gitlink bump).Landing order:
opencharly/spec#30→opencharly/charly(this PR). spec#30 has MERGED; this PR records its squash as thespecgitlink, so it merges second.Resolved:
charly#278landed first. It pinnedspecatbbb3c6a, an ANCESTOR of this PR's2c6e2bd6— a rewind hazard for whichever landed second. This branch took the merge and resolved the gitlink FORWARD; the proof is read off the merge commit, not the working tree (see the gate section).How R10-tested — exact gate, commands, and pasted output
The gate for this change class: the sweep runs from
main()on EVERYcharlyinvocation, so a bed exercises it dozens of times per run. Two disposable beds across two substrates, on this gitlink.Eval beds run — RE-RUN on the merged tree, not re-pointed. Binary
charly version=2026.227.2003.check-marketplace | pod | ok | 13 steps—.check/check-marketplace/2026.227.2007/check-commands-local | local | ok | 6 steps—.check/check-commands-local/2026.227.2005/charly#278merged mid-verification, movingsdk7a81472→2f6a3a7andspec→bbb3c6aonmain, so this branch took the update-branch merge and everything was re-derived on top of it. Two earlier evidence sets are therefore superseded rather than carried forward — a citation that describes a tree which is not the tree being merged is not evidence:.check/check-marketplace/2026.227.1246/,.check/check-commands-local/2026.227.1256/, binary2026.227.1146) ran againstspec2b63bbda, which lacks spec#29's refactor of the liveResolveLocalImageRefbody — andkeep_check_runsretention has since pruned the second directory outright, which is exactly why a stale run-dir citation cannot be assumed to still exist;…/2026.227.1948/,…/2026.227.1946/, binary2026.227.1902) predates the fix(check): the build-scope verdict verbs certify the artifact you built #278 merge.Fresh rebuild: R9 —
task build:binaryon the merged tree givescharly version=2026.227.2003, and both beds ran on that exact binary, each with its owncharly updateleg (check-marketplaceadditionally re-runscheck-liveandfeature-runagainst the rebuilt deployment).charly box validateexits 0 at zero warnings on the same tree.The gitlink resolution, proved off the MERGE COMMIT (a working tree that was already correct cannot prove a resolution):
gh pr update-branchrefused withCannot update PR branch due to conflicts; GitHub'smerge-treereports a conflict for a submodule gitlink that is in fact a fast-forward, and the local merge resolved cleanly to the descendant.GOWORK=offmodule gate + four-state discriminator (go.workmasks module-pin breakage entirely, so the pin was tested with it off):The repin introduces no new breakage. Full candy sweep on state C:
modules=92 failures=1— the single failure iscandy/plugin-dsh, identical on baseline A, owned by the named module-hygiene batch.charly/underGOWORK=offfails identically in A, B and C (missinggo.sumentries forgolang.org/x/text/golang.org/x/netpulled viacuelang.org/go) — likewise pre-existing, not caused here, and reported rather than silently absorbed.Did the CHANGED code path execute live? Yes — the 201 → 0 reap IS the changed path executing, and both beds then ran green with the new sweep active.
Concurrency:
N/Afor shared charly state — the sweep touches only the caller's own uid's temp entries and takes no lock. The beds ran on a host with several sibling worktrees building concurrently, which is how the$TMPDIRaccumulation arose.Attribution tier
analysed on a live system. The changed path ran live with a measured outcome and two disposable beds passed on this gitlink at zero warnings.Not
fully tested and validated, stated plainly rather than glossed: no available bed builds a LIVEcharly-localpkg-tree.marketplace-app,dsh-app,docs-site-appandcheck-commands-appcompose no localpkg candy (verified withcharly box inspect; no bed log mentions localpkg), and the beds that would are the long VM ones. So the two green beds prove non-regression across two substrates, not live-build safety. That property is unit-covered inspec#30, and the fix is what makes the coverage non-vacuous — pre-fix on a$TMPDIRhost the controlTestSweepStaleTemps_UnheldCreatorIsSweptFAILED, and its own message says the held-temp test "proves nothing" in that state. A VM-bed run exercising a real localpkg build is available as a follow-up and is noted as such rather than claimed.Trailer:
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system).One discrepancy, surfaced rather than left for the validator to find. The re-pin commit
f1516e95carries the trailer(fully tested and validated), on the strength of both beds being re-run on the corrected pin plus the post-commit rebuild. On reflection that is an over-claim: the re-run adds rebuild proof, not proof of the one scenario this PR's own limit names — no bed builds a livecharly-localpkg-tree — and no new evidence overturns that limit. The merge-time squash should carryanalysed on a live system. The commit cannot be amended (it is pushed, and force-push is forbidden on any branch), so the correction is recorded here for the validator, which composes the squash message.Harness rulebook compliance — state HOW each is satisfied
/charly-internals:go,/charly-internals:strict-policy,/charly-check:check,/charly-internals:git-workflow.env -u TMPDIRflips them green on the same tree;git stashreproduces them on the unmodified tree). Zero warnings across both bed runs.sweepRoots()feeds both consumers inspec; nothing duplicated here.spec#30.git status+git stash listchecked before every destructive action; every submodule probe in the four-state discriminator was a detached checkout of an existing commit and the tree was restored and verified clean after each. The re-pin landed as an ADDED commit (5c84ca25..f1516e95, fast-forward) — no force-push, no amend of a pushed commit, no push tomain.go test.N/A — no generation change.task build:binaryon the merged tree,charly version=2026.227.2003, and both beds re-run on that exact binary; no new runtime OS dependency.disposable: true, zero warnings; the discriminating coverage lives inspec#30and is pasted there failing on the pre-fix body in both environments.N/A(no candy changed). SDD — no.cuein THIS repo; the carried334fe91editsspec'sschema/candymodel.cuecomment and its regeneratedcue_types_gen.godoc block together, so generation is consistent at the pin.N/A— nocharly/source change; gitlink only.N/Afor this diff (no Go here); the producer PR carriesgofmt/golangci-lint/go testgreen in both environments.CHANGELOG/2026.227.1245.md— placeholder CalVer, the pr-validator finalizes it. Flagged, not fixed here:2026.227.1245is EARLIER thanv2026.227.1725, the newest tag reachable frommain, so finalizing it unchanged would place this release behind one already tagged. The merging validator owns the stamp and must regenerate it.Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)