Refresh already-linked GitHub items without importing new ones

Merged
UN
4d ago
+1686-63

Selective mirrors went stale because importing also created unrelated issues. pm github refresh owner/repo selects existing explicit issue links, fetches only those issue numbers in GraphQL batches, and reuses audited update-only import transactions. Missing or inaccessible issues remain unchanged; previews report field deltas, and unchanged source data produces zero tracker, history, journal or cache writes. Native release attribution and cross-provider ownership are preserved.

Interrupted refreshes replay their original saved transaction plans before filtering unchanged entries. Every selected plan and its SDK journal compatibility is validated before any replay; recovery refuses another repository, unusable plans and dry runs without changing the tracker. Original journal replay avoids duplicate audit comments. Recovery precedes GitHub requests, so recovered writes can remain committed if a later request fails. Terminal failures remove orphan replay plans while interrupted transactions retain their recovery data; canceled updates carry their close reason.

Unresolved threadFix
PRRT_kwDOTbN4pM6uMtSjValidate every finalization input before replay: source identity, metadata types, ownership, source date ordering and effective native lifecycle. Valid empty/null source values and legacy optional fidelity remain supported.

Self-review extended the same preflight to every prepared entry before fresh atomic or sequential refresh writes and to direct update-only transactions before plan persistence. A source creation date later than a retained native closure now fails before the first write. Unexpected fidelity keys are rejected because finalization projects those keys into item metadata. The latest review body contains no Outside diff range findings.

Regression and revert evidence:

  • Real two-journal regressions corrupt the second plan's closure timestamp and other finalization inputs, then compare every tracker file byte. Fresh atomic and sequential regressions likewise refuse a later native-date conflict before updating the first item.
  • Three disposable-copy controls rebuilt with npm run build and each failed 1/1 on the intended byte-equality assertion: restoring the old plan-validator body, removing native-lifecycle validation, and removing fresh all-entry preflight. Restoring the functions passed 4/4 selected regressions.
  • Exact selections: node --test --test-name-pattern="persisted fidelity in every" test/refresh.test.ts for the first two controls; node --test --test-name-pattern="fresh refresh validates.*false" test/refresh.test.ts for the third. Full receipts are in the PM item and evidence document.

Local release validation on the unchanged source:

  • Isolated HOME/Git identity: npm run release:check and bun run release:check each exited 0, passing 958/958 tests with zero failures, skips, cancellations or TODOs.
  • Both measured all 16 authored modules at exact 100/100/100/100: 11,035 lines/statements, 299 functions and 3,510 branches, all covered with zero skips. Pins, thresholds, source inventory and duplication budgets are unchanged.
  • Audit, privacy, duplication, packing, changelog and publish-attestation checks passed. Both package dry-run shasums are 065699c7d14f076692c3970954f9f9fdd98579f3.
  • Native bun test --timeout 600000 test/refresh.test.ts passed 35/35. Both PM-linked focused selections passed 2/2. All three negative controls failed as intended, and the restored selection passed 4/4.
  • Independent checkouts matched all 146 code/test/configuration files byte-for-byte. The committed head passed strict PM health and tracker validation in a fresh non-local clone, plus a fresh privacy scan. Existing ordinary-host extension skew and project-disabled PM result persistence remain environment/policy limitations; explicit receipts are recorded on the item.

PM: pm-github-ullj, in progress with its claim released. Existing history bytes are unchanged and new records are append-only.

Commit: fc12ee161dec42244f2d9cb7d80c4841ab19c8e5. Detailed evidence.