Skip to content

Batch: content-screen resolution and reachability, GIT_* scrub, zsh scan, context aliases - #5

Merged
alkisyuv merged 9 commits into
mainfrom
release/batch-2026-08-24
Aug 24, 2026
Merged

Batch: content-screen resolution and reachability, GIT_* scrub, zsh scan, context aliases#5
alkisyuv merged 9 commits into
mainfrom
release/batch-2026-08-24

Conversation

@alkisyuv

Copy link
Copy Markdown
Member

Merge this one and the other three close themselves. It merges their branches rather than
copying their commits, so #1, #3 and #4 become ancestors of main and GitHub closes them.

Everything here is already reviewed in those PRs. What this branch adds is the integration:
conflicts resolved, one pack version, hooks regenerated once, and one defect that only appeared
when the three met.

What ships

From Change Bump
#3 Content screener resolved at generation time — the ./dist/cli.js guess leaves every consumer hook minor
#3 A gate that cannot run is caught and explains itself (hooks + audit/doctor) minor
#3 Context economy counts aliased instruction files (symlink/hardlink) once patch
#4 zsh out of the shellcheck scan; ~/ home paths no longer read as repo refs; init scaffold opt-in minor
#1 Generated pre-push steps run scrubbed of git's exported GIT_* environment minor

Five changesets → 0.14.0. Pack v8 → v12.

Integration decisions

  • .changeset/upstream-vocabulary-exemption.md deleted. feat(gates): run gate steps scrubbed of git's exported GIT_* environment #1 branches from before the 0.12.0
    release and still carried it; that changeset already shipped as 0.12.0 (verbatim in
    CHANGELOG.md). Keeping it would have re-announced a released change.
  • Pack pinned to 12, above every number the branches claim (10 and 11), so one number means
    one pack whatever the merge order. Gaps stay retired.
  • Hooks regenerated, never hand-merged. All four generated files conflicted in every merge
    because each branch regenerated them. They are output: resolved by regenerating from the merged
    templates in the final commit.
  • src/pack/templates.ts kept both sides. The GIT_* scrub helper and the new selfBuild
    parameter are adjacent, not contradictory.

The defect the merge exposed

The generated pre-push explains why zsh is left out of the shellcheck scan. That comment began
with the checker's own name — and a comment whose first word is that name is parsed as a
directive, an unparseable one, so SC1072/SC1073 failed the very push gate the comment
documents. Invisible in #4 alone (nothing regenerated and re-checked the hook there); it surfaced
the moment the merged templates were regenerated and shellchecked.

Reworded, with the reason recorded beside it, and pinned: a test now regenerates the hooks and
runs shellcheck over them at warning. A gate that runs a checker has to survive that checker.

Green

npm test 288 passed | 8 skipped · format:check · typecheck · self-audit clean at exit 0 ·
all four regenerated hooks shellcheck-clean at warning.

After merging

  • Release is a separate step and deliberately not done here.
  • Every repo with generated hooks goes stale on release and refreshes with etymd gates -y.
  • The self-audit discloses Baseline was approved under pack v8; current pack is v12
    re-approving the baseline is a separate call.

- pre-push: zsh shebangs are excluded from the shellcheck discovery (SC1071
  is a parser-level error, so checking zsh would block every push in a repo
  whose surface is zsh); the exclusion is printed at run time, never silent.
  Pack v10; v9 is skipped so no two template meanings share a version.
- instruction-truth: a well-known doc mentioned inside a ~/ home path is not
  a repo file reference — skipped and disclosed like absolute tokens; one
  ordinary mention still makes the doc a live claim.
- init: the AGENTS.md scaffold is opt-in via --with-agents; init -y alone
  never seeds template prose that no one reviewed, and never baselines it.
Git exports GIT_DIR/GIT_WORK_TREE/… to every hook; a child git that inherits
them ignores its cwd, so a hook-run suite building fixture repositories operates
on the real repo. Every pre-push step now runs through a run_gate() helper that
strips every exported GIT_* name (not a fixed list); audit and shellcheck steps
stay direct by design. The .local companion note documents the wrap for
hand-written guards. Pack v11 — v9/v10 stay retired.
The emitted resolution carried a bare `[ -x ./dist/cli.js ]` check ahead of the etymd on
PATH. That path is where a great many CLI projects build, so any repo building its own
binary there had the hook invoke that binary as the screener. It does not know `screen`:
the commit door failed closed on every commit, and the push door — which ignores the
screen's exit status by design — skipped the whole-tree pass in silence. A plain
dependency install armed it, since that runs the repo's build.

Resolution is now CONTENT_GATE, then the etymd on PATH. The dev-build arm survives for the
repo developing the screener itself, where gating on an unreleased build is the point, but
`isSelfBuildRepo` decides it at generation time from the MANIFEST name — not `facts.name`,
which falls back to the directory basename and would re-arm the same coincidence.

Pack v12; this repo's own hooks regenerated in the same commit.
Symlinking AGENTS.md to CLAUDE.md is the ordinary way to serve harnesses that read
different names. Both were measured separately, doubling the reported always-loaded
footprint — enough to manufacture an over-budget finding out of nothing — and firing the
heavy-file finding twice for a single file.

Candidates resolving to one inode (symlink or hardlink) are counted once and reported
under every name they answer to, in the lens and `etymd context` alike. The finding ID
stays the primary path so a ledger entry survives a repo adding or dropping a name, and
the merge is stated in the disclosures rather than applied silently.
The screen doors resolve their checker at run time from outside the repo, so whether the
gate will run is the one thing reading the hook cannot answer. When the resolved checker is
not a screener, the commit door failed closed on that program's bare error and the push
door — advisory by design — skipped its pass in silence.

Two halves of one class. The emitted hooks now probe `screen --help` AFTER a failure only,
and print the version floor and the override rather than leaving "unknown command" as the
last word; a screener reporting a real finding is left to speak for itself. And gate
integrity resolves the runner the way the hook does and asks it the same question, as a
risk/truth finding so `doctor` surfaces it too.

No checker installed stays the designed no-op — disclosed, never a finding — and a probe
that could not be carried out claims nothing.
Resolution: `.changeset/upstream-vocabulary-exemption.md` deleted rather than carried. The
branch predates the 0.12.0 release, where that exact changeset already shipped; keeping it
would re-announce a released change in the next changelog.
Resolution: pack version set to 12, above every number the merged branches claim, so the
release exposes one meaning per number regardless of merge order. The four generated hooks
are regenerated from the merged templates in a later commit rather than hand-resolved —
they are output, and hand-merging output is how a gate stops matching its generator.
…achability, context aliases

Resolution in src/pack/templates.ts: both sides kept. The GIT_* scrub helper stays, and
generatePrePushHook takes the new selfBuild flag — the two changes touch the same lines only
because they are adjacent, not because they disagree. Pack stays at 12; generated hooks are
regenerated from the merged templates in the next commit.
Regenerating the hooks from the merged templates surfaced a defect none of the three
branches could see alone: the comment explaining why zsh is excluded began with the
checker's own name, and a comment starting with that name is parsed as a DIRECTIVE — an
unparseable one, so SC1072/SC1073 failed the very push gate the comment documents. Reworded
to "the checker", with the reason recorded beside it.

Pinned so the class cannot return: a test regenerates the hooks and runs shellcheck over
them at warning, skipping only where shellcheck is not installed. A gate that runs a
checker has to survive that checker.

Also regenerates this repo's hooks from the merged templates at pack v12 — they carry all
three streams: the GIT_* scrub, the zsh exclusion, and the screen doors that explain
themselves.
@alkisyuv
alkisyuv merged commit dd951da into main Aug 24, 2026
1 check passed
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