Repository navigation
fix: stop double reports and handoff churn for 26.11.20 - #43
Merged
Merged
Conversation
The developer asked for devkit to be as stable as possible for daily, heavy use, and main's CI failed after v26.11.19. Root cause: The wait printed a crew or peer message before claiming it, so a hook that took it in between reported it too (main CI run 44027389111). The handoff repository took a commit and push on every hook sync and tracked a per-Mac registry cache, so it grew about 10 MB a day; the audit copy was one monthly file that stopped publishing past 45 MB; audit queries cleaned every record before filtering. The rest came from a triage of this Mac's logs, held bug reports, GitHub issues and the backlog: task writes printed the whole list after their own line, several ids were joined into one search, a peer's malformed presence file crashed dev progress, answered questions stayed unacknowledged, writers shared one fixed temp file name, dev plan revise stamped non-Markdown files, a two-word Spanish message counted as unclear, dev test prove took an import error as proof, and the test runner's receipt was refused by the repository's test guard. dev watch claims each message under the lock before printing and gives the claim back on failure. Background syncs push the handoff at most every sync.push_interval seconds (default 300) through one flusher per Mac; urgent changes push at once; files over 45 MB are never committed; gc runs only in the scheduled sync. registry.json leaves git, generated views skip timestamp-only changes, note blocks are written only by a Mac with the clone, presence is written on real changes. The audit copy is one file per closed UTC day; queries filter before cleaning and the table cleans only the rows it shows. dev doctor judges its own job, shows quota as a warning, prints each header once. Plus the triaged fixes listed in the CHANGELOG, the Chrome test harness retry, and docs. Verified: lanes' runs on python3 3.15 and /usr/bin/python3 3.9: dev test 4,733/4,737 with the 3 release-argument failures fixed and rerun green; dev test prove on every new test; dev docs check 0 issues; plain dev audit 4.87 s to 0.35 s on this Mac's 91,000-record month
The final review of the 26.11.20 stabilization reproduced both with two Macs, plus five low findings. Root cause: A background sync left generated files uncommitted for up to the push interval, and an urgent pull moves the checkout with git reset --keep, which refuses when such a file differs on the remote, so a claim failed and a release or done stayed local. registry.json was untracked in the handoff repository while a Mac on an older devkit kept committing it, so the two Macs traded it back and overwrote each other's copy. An urgent pull or push first commits what waits, with the same staging and 45 MB gate as the batched sync. Each Mac's registry.json lives in devkit's state folder (core.REGISTRY); readers fall back to the handoff copy only while the state copy is missing, and devkit no longer writes or untracks the handoff copy. The wait acknowledges a peer message only after printing it, the flusher pushes under the sync lock and clears its record on exit, dev task edit refuses several ids with --title or --body-file, and dev test prove matches only messages that start with an import or collection error. Docs and the CHANGELOG follow. Verified: Senior engineer: 807 tests on python3 3.15 and /usr/bin/python3 3.9, dev test prove 15 of 15 new tests fail without the change, blast radius 4,741 of 4,750 then the 8 fixture failures fixed (617 tests on both); the reviewer's two-Mac probes pass; dev docs check 0 issues
ancongui
marked this pull request as ready for review
November 17, 2026 10:59
This was referenced Nov 17, 2026
Merged
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.
What
Release 26.11.20: makes devkit hold up under heavy daily use, and fixes the race that turned main's CI red after
v26.11.19.
dev watchreported one message twice: the wait printed a crew or peer message before claiming it, so a hookthat took it in between reported it too (main CI run 44027389111). The wait now claims under the lock first and
gives the claim back if printing fails.
sync.push_intervalseconds (default 300)through one flusher per Mac; claims, embargoes, the end of a session and a sync you run still push at once; files
over 45 MB are never committed;
git gc --autoruns only in the scheduled sync.registry.json(a per-Mac cachecommitted thousands of times) leaves git, generated views skip timestamp-only changes, a note's generated block is
written only by a Mac with the clone, and presence is written on real changes.
limit is held and named); queries filter before cleaning and the table cleans only the rows it shows: a plain
7-day
dev auditon a 91,000-record month went from 4.9 s to 0.35 s.line and act on several ids,
dev progresssurvives a malformed presence file, answered questions count as read,writers that shared one temp file name are atomic,
dev plan revisetouches only Markdown, short Spanish messagesdecide the reply language,
dev test proveno longer counts an import error as proof, the test runner's receiptworks in this repository, old-format bug reports say they cannot be sent,
dev doctorjudges its own job andshows a used-up quota as a warning,
dev release <version>takes a plain argument.Why
The developer asked for devkit to be as stable as possible for daily, heavy use, and main's CI failed after v26.11.19
on a real race and a runner Chrome hang.
How to verify
dev ci --runon this branch (the local CI below passed on85f4a00);dev auditon a heavy month; two Macssharing a handoff repository: a claim with a batched change waiting reaches the remote.
How it was verified
dev ci --run) ona751449and again on85f4a00(the review fixes): compile, unit tests on Python 3.13 and 3.9 (24 min), gitleaks, semgrep,osv-scanner, trivy, zizmor; evidence recorded.
dev test prove), several lanes added targeted mutants.waiting,
registry.jsontraded with an older Mac) are fixed in85f4a00and the re-review approved them.Refs: #40, #41, #42