Preserve tracker bytes on repeated GitHub imports
Fixes #287
On pm-rl main at e11861f, PM CLI 2026.11.24 and a captured nine-issue GitHub source snapshot reproduced the failure. Both published pm-github versions, 2026.11.25 and 2026.11.26, went from 17 to 18 to 19 native comments on issue #202. The repeat appended comment_add for provider comment 7140375699 and advanced updated_at. The compact SDK read returned 253 of the comment's 1,221 characters and omitted its trailing ID. The npm artifacts differ only in the extension version string. The merged #288 change landed after the 2026.11.26 tag and preserves both item and history bytes on this snapshot.
The reusable sync workflow now uses the gated preview's source receipt for apply and repeat. A mismatch in selected issues, comments or closure evidence fails with github_import_source_drift before that invocation writes tracker state. The repeat still must pass tracked and untracked diff checks and the privacy scan. Both import command forms expose the receipt in JSON and TOON. Snapshot-bound imports refuse to replay a pending plan. Atomic receipts distinguish native comments and new dependency edges from true no-ops. Plain imports compare only fields they can update, and Projects imports skip identical content and avoid closing an already-closed item again.
Behavioral reverts separately failed the source comparison, both workflow arguments, both recovery guards, annotation and dependency receipts, and plain and Projects comparisons. Restoring the released comment read/append function reproduced the real caller's extra annotation and history row in the packed candidate. The seven PM-linked regressions passed. The packed npm and native Bun consumers passed the pm-rl replay using the same frozen source with byte-identical item and history files on repeat.
Caller rollout and matching hosted verification are tracked in #297 for pm-rl, pm-web, pm-vcs and pm-hypothesis. The latest inspected pm-rl run still uses the old pin and fails at the repeat gate. Hosted pm-rl run
Tracker items pm-github-github-ee4d59c27b67-287 and pm-github-github-ee4d59c27b67-297
Local verification passed 1,832 distinct cases across 68 related files and four focused sync-workflow cases, with the updated selection and packed Bun fixtures rerun. The PM-linked commands passed 7/7, 26/26, and 1/1. Typecheck, builds, lint, docstrings, duplication, changelog and strict tracker health passed. The identity and privacy gate passed on 5,093 objects in a fresh clone of the exact delivery commit.
Summary by cubic
Fixes #287. Repeated syncs of the same frozen GitHub source now produce byte-identical tracker items and history; previously the compact SDK read truncated long comments, so a second pass appended a duplicate comment_add row and advanced updated_at.
- The importer reads the full stored comment so a long comment's trailing GitHub ID is preserved.
- A sha256 source receipt (
--expect-source) flows from the gated preview into apply and repeat; drift in selected issues, comments, or closure evidence fails withgithub_import_source_driftbefore writing tracker state. - Snapshot-bound imports refuse to replay a pending plan; plain imports compare only fields they can update, and Projects imports skip identical content, no longer close an already-closed item, reject ambiguous write targets in either input order, and preserve verified legacy ownership when the original board association still resolves.
- Revalidated Projects links that no longer resolve to the intended item block the workflow with a safe ownership remedy; the workflow also blocks on structured
blockedreceipts. - Repeat-import tests require real JSONL history records after the unchanged prefix, exercise source drift through the SDK, and write-outcome messages now distinguish added annotations from "nothing changed".
- Caller rollout and hosted verification are tracked in #297.