Files
GitNexus/gitnexus-shared
Gergo MagyarandClaude Opus 5 eb864e5ad9 feat(resolution): receiver-chain codec v2 with name-free step kinds (#2766)
Await-wrapped and subscript receivers need step kinds the wire format
cannot express. Both are NAME-FREE: an awaited call's method name already
lives on its `c` step, and a subscript's key is a value rather than an
identifier the resolver could look up. Adds `a` and `i` sigils encoding
as a BARE sigil, and moves VERSION 1 -> 2.

The encoder's non-empty-name guard is NOT relaxed. Name-free kinds skip
it because they have no name to check; an empty-name `c` or `f` is still
refused. The decoder rejects any trailing characters after `a` or `i`,
which is what stops a corrupt payload smuggling a tail through the
exemption — `2|svc|await` and `2|repos|i0` both refuse, and a bare `c`
stays malformed rather than becoming an await.

A v2 decoder refuses a v1 payload outright. That is the point rather than
a limitation: a chain missing whichever hop v1 could not express decodes
cleanly as a complete-but-different, shorter chain, and would type the
receiver against the wrong member. Refusing is lossy but safe; the site
falls back to the text cascade.

SCHEMA_BUMP 34 -> 37, INCREMENTAL_SCHEMA_VERSION 28 -> 31. Both are
required: every persisted chain string changed prefix, so a stale cache
or index replays chains this build silently discards, degrading to the
text cascade with no error anywhere.

NUMBERED 37/31, NOT 35/29: `origin/main` had already reached 36/30 while
this branch was in flight. That is the FIFTH time this collision has bitten
the series, and it is invisible unless you diff against origin/main rather
than the branch point. Re-check both immediately before merge, again.

Baselines: 12 scope-capture fingerprints rebaselined with a documented
reason. The VERSION prefix is part of every emitted
`@reference.receiver-chain` capture, so a wire-format change moves the
capture text for every chain-minting language while minting the same
chains for the same sites. Exactly the 12 chain-minting languages drifted;
c, cobol and dart did not — that boundary is the check that this is the
prefix and not a capture regression. receiver-resolution states and
call-drop counts are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 16:28:23 +00:00
..