Batch: content-screen resolution and reachability, GIT_* scrub, zsh scan, context aliases - #5
Merged
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mainand 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
./dist/cli.jsguess leaves every consumer hookaudit/doctor)~/home paths no longer read as repo refs;initscaffold opt-inGIT_*environmentFive changesets → 0.14.0. Pack v8 → v12.
Integration decisions
.changeset/upstream-vocabulary-exemption.mddeleted. feat(gates): run gate steps scrubbed of git's exported GIT_* environment #1 branches from before the 0.12.0release 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.one pack whatever the merge order. Gaps stay retired.
because each branch regenerated them. They are output: resolved by regenerating from the merged
templates in the final commit.
src/pack/templates.tskept both sides. TheGIT_*scrub helper and the newselfBuildparameter 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/SC1073failed the very push gate the commentdocuments. 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 test288 passed | 8 skipped ·format:check·typecheck· self-audit clean at exit 0 ·all four regenerated hooks shellcheck-clean at warning.
After merging
etymd gates -y.Baseline was approved under pack v8; current pack is v12—re-approving the baseline is a separate call.