orca/.github
Brennan Benson 8d61d76a59
fix(skills): decouple skill-manifest verify from local git tags (#10340)
* fix(skills): source released history from the committed ledger, not a tag walk

verify:skill-bundle-manifest rebuilt the entire released-skill history by
walking every local refs/tags/v* on each run and demanded byte-equality with
the committed artifacts. Output was therefore a function of (skill bytes x
local tag set x release timing), so any clone holding stray, deleted, or fork
tags the committed artifacts predate rebuilt a divergent registry and failed
lint. This was the 4th instance of one failure class (#8637 -> #9119 version
bumps -> #9778 new tags -> local tag drift), each patched with a new tolerance
rather than removing the tag coupling.

Fix: the committed snapshot-registry + release-mapping ARE the released history;
trust them instead of re-deriving from tags.

- releasedHistoryFromCommitted() seeds generation from the committed ledger,
  dropping the floating unreleased tail (entries beyond what the mapping names).
  verify and --write are now pure functions of working-tree bytes with zero tag
  access. The tag walk survives only behind --rebuild-from-tags (disaster
  recovery), off the everyday path.
- --release <version> + appendReleaseRow() perform the O(1) append of one
  mapping row at release cut (dedupes vs the last row, strips the v-prefix) --
  the single authoritative point where working-tree bytes become an immutable
  released revision.
- release-cut.yml runs generate --release "$VERSION" before the release commit
  (Node built-ins only, no install needed); pr.yml drops fetch-depth: 0 from the
  lint job since verify no longer needs tag history.

Recognition is unaffected: the runtime uses knownSnapshots = registry.skills
(all entries, incl. the tail committed at PR-merge time), so a missing mapping
row only loses a version label, never recognition or the update nudge.

Trade-off: lint no longer cross-checks committed historical snapshots against
tags. A hand-edit to an old released entry is still caught by the runtime
manifest<->registry consistency check when the current manifest points at it,
and can be audited anytime with --rebuild-from-tags.

Verified: verify passes committed-sourced; --write is zero-diff (byte parity);
a planted stray v-tag no longer changes output; edit-stub -> --write -> --release
appends the correct single row; double --release is idempotent;
--rebuild-from-tags reproduces the committed artifacts. Generator tests 14 pass/
1 skip; runtime skill-bundle-artifacts + freshness-inventory 14 pass; bundled
skill guides verify passes.

* fix(skills): keep one release-mapping row per version on a re-cut

A cut that pushed the version bump to main but died before pushing the
tag is re-cut at the same version. If skills changed in between, the
second --release appended a duplicate row, and the stale one named
revisions that tag never ships — which verify-skill-update-roundtrip
then pairs with the tag's real bytes.

Overwrite the trailing row instead (the tag is absent, so that version
was never published). Refuse only when an earlier row claims the
version, which the cut workflow already rejects upstream, so this
cannot wedge a recovering cut.
2026-07-24 14:09:28 -07:00
..
ISSUE_TEMPLATE Assign GitHub issue types (Bug/Feature) via issue templates (#8346) 2026-07-11 20:20:49 -07:00
scripts Use generated README downloads badge 2026-06-16 11:09:40 -07:00
workflows fix(skills): decouple skill-manifest verify from local git tags (#10340) 2026-07-24 14:09:28 -07:00
CONTRIBUTING.md Update CONTRIBUTING.md 2026-06-01 23:38:15 -07:00
pull_request_template.md docs: add contribution guide and PR template (#163) 2026-03-28 10:44:02 -07:00