Skip to content

feat: global emit-cli refresh script with link-drift guard (D082 update)#525

Merged
creatornader merged 1 commit into
mainfrom
chore/emit-cli-guard
Jul 15, 2026
Merged

feat: global emit-cli refresh script with link-drift guard (D082 update)#525
creatornader merged 1 commit into
mainfrom
chore/emit-cli-guard

Conversation

@creatornader

Copy link
Copy Markdown
Owner

Fallout hardening from the 2026-07-14/15 hook-signing outage.

Research showed the outage was the third incident of one class: machine-wide hook signing resolving through the development checkout. D082 already decided the supported path (npm install -g @atrib/emit); a June global npm link into the checkout was undocumented drift from it and reintroduced exactly the coupling D082 removed.

  • scripts/refresh-global-emit-cli.mjs (pnpm refresh:global-emit-cli): D128-class updater and guard. Reinstalls from the registry (--check skips the install; --version pins), hard-fails when the global package or its @atrib scope dir is a symlink, requires dist/cli.js, and gates on a smoke envelope signing cleanly (parseable JSON, signed: true, well-formed hash, zero warnings) through the same node+cli.js invocation the hook helper uses. Smoke records use a fixed maintenance context_id so they chain together. All three negative gates tested against scratch prefixes (linked package, linked scope dir, missing cli.js all exit 1); positive path verified against the live prefix (log_index 78850).
  • D082 gains a dated update note recording the incident, the restoration, and the per-session ATRIB_EMIT_CLI_BIN override as the sanctioned latest-from-checkout path.
  • CLAUDE.md tree lists the script.

Gates: pnpm doc-sync (14 checks), typos.

D082 update note records the 2026-07-14 hook-signing outage: a June
global npm link into the checkout reintroduced the coupling D082
removed, and a partial workspace install broke every hook fire for
roughly eighteen hours. The registry install is restored; the new
script is the D128-class updater and guard (reinstall, symlink-drift
gates on the package and scope dirs, signed smoke envelope gate).
@creatornader
creatornader enabled auto-merge (squash) July 15, 2026 19:44
@creatornader
creatornader merged commit 9e90d07 into main Jul 15, 2026
14 checks passed
@creatornader
creatornader deleted the chore/emit-cli-guard branch July 15, 2026 19:49
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