Skip to content

feat(ci): detect caller-template drift (DEC-080) - #57

Merged
omar-nahhas merged 1 commit into
mainfrom
feat/caller-drift-check
Aug 5, 2026
Merged

omar-nahhas merged 1 commit into
mainfrom
feat/caller-drift-check

Conversation

@omar-nahhas

Copy link
Copy Markdown
Contributor

Closes C5.

make link-workflows copies the caller templates into a consumer, and devkit-sync deliberately never writes .github/workflows/. So the vendored devkit advances while the copied caller stands still — and nothing at runtime notices. Both known instances were silent by construction:

  • share-chat could not reach the capture_all_traces input for weeks; no run ever failed to say so
  • actions: write (DEC-074) needed hand-propagating to 4 repos in 4 PRs, and until then the prune degraded to a warning rather than failing

What counts as drift

Compares the executable contract — triggers, dispatch inputs, permissions, job ids, uses refs, with inputs, secrets shape. Ignores comments, whitespace, quoting, key order, prose descriptions.

That line is deliberate: a byte-diff would have fired on all four consumers the moment the devkit rewrote a header comment for DEC-079, and a checker that cries wolf gets || true'd.

Templates resolve to the consumer's own pinned tests/_testkit when available, so each repo is judged against the devkit ref it pinned.

The self-test is the point

It replays both real incidents as positive controls, and pins the cosmetic tolerances as negative controls — so the tempting fix for a noisy checker (loosen until quiet) fails the suite instead of passing silently. 10/10 green.

Verified against live main

repo result
chat-comments in sync
diff-visualizer in sync
mermaid-diagrams in sync
share-chat 4 drifted paths — capture_all_traces input + its with: wiring

Fixing share-chat separately.

make link-workflows COPIES the caller templates into a consumer, and devkit-sync
deliberately never writes .github/workflows/. So the vendored devkit advances
while the copied caller stands still and nothing at runtime notices. Both known
instances were silent by construction:
  - share-chat could not reach the capture_all_traces input for weeks, because
    its caller predated it; no run ever failed to say so
  - actions: write (DEC-074) needed hand-propagating to 4 repos in 4 PRs, and
    until then the prune degraded to a WARNING rather than failing

The check compares the EXECUTABLE CONTRACT — triggers, dispatch inputs,
permissions, job ids, uses refs, with inputs, secrets shape — and ignores
comments, whitespace, quoting, key order and prose descriptions. That line is
deliberate: a byte-diff would have fired on all four consumers the moment the
devkit rewrote a header comment for DEC-079, and a checker that cries wolf gets
|| true-d.

Templates resolve to the consumers own pinned tests/_testkit when available, so
each repo is judged against the devkit ref IT pinned, not whatever main is.

The self-test replays both real incidents as positive controls and pins the
cosmetic tolerances as negative controls — so the tempting fix for a noisy
checker (loosen until quiet) fails the suite instead of passing silently.
10/10 green.

Verified against live main: 3 of 4 consumers in sync, share-chat drifted on 4
paths (the capture_all_traces input and its wiring) — the one genuine gap.
@omar-nahhas
omar-nahhas force-pushed the feat/caller-drift-check branch from 1cf62e8 to 923bbef Compare August 5, 2026 00:18
@omar-nahhas
omar-nahhas merged commit f51f9e3 into main Aug 5, 2026
1 check passed
@omar-nahhas
omar-nahhas deleted the feat/caller-drift-check branch August 5, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant