Skip to content

docs(orchestrator): pnpm-flake kickoff rev 2 — Phase -1 cold-review fixes (3 rounds, GO) - #1283

Merged
artyhoo merged 1 commit into
stagingfrom
feature/consumer-matrix-pnpm-flake-kickoff-r3
Aug 7, 2026
Merged

docs(orchestrator): pnpm-flake kickoff rev 2 — Phase -1 cold-review fixes (3 rounds, GO)#1283
artyhoo merged 1 commit into
stagingfrom
feature/consumer-matrix-pnpm-flake-kickoff-r3

Conversation

@artyhoo

@artyhoo artyhoo commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

Pre-dispatch Phase -1 cold review (1× Opus, 3 rounds → GO) found the merged kickoff undispatchable: step 1 was physically unexecutable (the cell script's EXIT trap deletes the fixture on every exit, pnpm-monorepo-cell.sh:52), the container preflight was unstated, and the investigation's strongest lead was missing — packages/core/audit-self/check-rule-enforced.sh:197 swallows stderr and ignores rc of eslint --print-config, so a transient eslint crash prints the exact same «SILENTLY INERT» line as genuine rule inertness. This revision folds in all 2 BLOCKER + 9 MAJOR/MINOR findings; dispatch happens only after this merges (kickoff-staging-placement.md §1).

Changes

  • Step 0 (new): container preflight — node 22, corepack enable (pnpm@9.12.3 download), mandatory FRAMEWORK_ROOT export; a preflight red is an ENV failure, not a reproduction.
  • Step 1: trap-stripped scratch copy + per-iteration $WORK echo; IN-SITU rc+stderr capture via anchored sed patch of the consumer's check copy (post-hoc re-runs classify nothing); disk policy (rm on pass, keep failures); run-feat: audit fixes Phase 1+2+3 (R2/R11 drift, manifest SSOT, depcruise integration) #1 timing + N≥10 fallback with stated coverage.
  • Step 4: binding H2 discriminator on the in-situ record + third outcome (post-hoc rule-present ⇒ transient); gh-unavailable fallback pre-answered.
  • Evidence: «root config» label corrected (cwd-relative, check-rule-enforced.sh:193; :146 is a separate invocation); unpinned CORE_DEVDEPS range (setup.d/70-deps.sh:158-167, :297) named as step 3's target; exact template path (packages/core/audit-self/check-rule-enforced.sh → consumer scripts/ via install.sh:873).
  • host-verify: bounded 3-roll smoke that can actually fail ([ "$fails" -lt 3 ] — the previous trailing-echo form always exited 0, reviewer-probed), HOST_VERIFY_TIMEOUT=3600 mandated.
  • Acceptance: done.md default (outside principle 09 scope); research-patch CI gates enumerated (principle 10 scope line, §1.7, sections, ≤100 LOC).

Prior-art consult

  • No capability commits — docs-only kickoff revision.
  • New capability area: n/a.
  • Existing entries: n/a.
  • context7 queries: n/a.

Test plan

  • Phase -1 cold review rounds 1-3 (same reviewer, findings list in commit body); round 3 = GO, both MINOR residuals folded in
  • Reviewer empirically probed the host-verify one-liner (bash -n OK; rc=1 at 3/3 fails, rc=0 below)
  • check-kickoff-traps.sh edit-time hook green; markdownlint green at commit
  • CI on this PR green

Provenance

n/a

Review findings

Phase -1 pre-dispatch review, 3 rounds: R1 = 2 BLOCKER + 5 MAJOR + 4 MINOR; R2 (after fixes) = 4 MAJOR + 2 MINOR; R3 = GO + 2 MINOR (both folded in). Full lists in the commit body and session transcript.

Fidelity verdict

FIDELITY: skipped — docs-only kickoff revision PR, no stage pipeline applies

Parked questions

n/a

§1.7 Self-discipline check (REQUIRED if PR touches discipline-bearing files)

§1.7 Skipped: docs-only revision of an orchestrator-prompts kickoff; no discipline rule introduced or extended, follows existing conventions

…nds, GO)

Pre-dispatch cold review (1x Opus, 3 rounds) found the kickoff undispatchable
as merged and materially wrong in places; this revision folds in all findings:

- BLOCKER: step 1 was unexecutable — the shipped cell script deletes its
  fixture on EVERY exit (trap at pnpm-monorepo-cell.sh:52); now instructs a
  trap-stripped scratch copy + per-iteration $WORK echo + disk policy
  (rm on pass, keep failures).
- BLOCKER: container preflight was unstated (node 22, corepack enable →
  pnpm@9.12.3 download, FRAMEWORK_ROOT export — mandatory for the copy, the
  BASH_SOURCE-derived default at :50 resolves to / from /tmp).
- Prime lead named: check-rule-enforced.sh:197 swallows stderr and ignores
  rc of eslint --print-config — a transient eslint crash prints the SAME
  «SILENTLY INERT» line as genuine inertness; the signature is ambiguous by
  construction. Capture must be IN SITU (anchored sed patch of the consumer
  copy); binding H2 discriminator + third outcome (post-hoc rule-present ⇒
  transient) added to step 4.
- «root config» label corrected (cwd-relative per :193; the failing
  invocation ran inside apps/api; :146 skip is a separate invocation).
- Unpinned CORE_DEVDEPS range (setup.d/70-deps.sh:158-167, :297) named as
  step 3's concrete enumeration target; template path made exact
  (packages/core/audit-self/check-rule-enforced.sh → scripts/ via
  install.sh:873).
- host-verify: bounded 3-roll smoke that can actually FAIL
  ([ "$fails" -lt 3 ]; the earlier trailing-echo form always exited 0),
  HOST_VERIFY_TIMEOUT=3600 mandated (900s default at host-verify.sh:452).
- Acceptance: done.md default (outside principle 09 scope), research-patch
  CI gates enumerated, gh-unavailable fallback pre-answered.
@artyhoo
artyhoo merged commit 025aac0 into staging Aug 7, 2026
73 of 75 checks passed
@artyhoo
artyhoo deleted the feature/consumer-matrix-pnpm-flake-kickoff-r3 branch August 7, 2026 23:05
artyhoo added a commit that referenced this pull request Aug 8, 2026
…kickoff rev 2 clobbered by #1285 squash-rebuild (#1298)

* fix(setup): restore §1j create-worktree env+ shipping clobbered by #1285 squash-rebuild

PR #1285 (ab280e1) was squash-rebuilt from a stale base and silently
reverted PR #1284 (1812a8c): the §1j block shipping
scripts/create-worktree.sh under env|factory profiles. Re-applies the
original 36-line insertion onto the current file; #1285's A8 three-arm
split is untouched.

Prior-art: skipped — restoration of already-merged reviewed content, no new capability

* docs(orchestrator): restore pnpm-flake kickoff rev 2 clobbered by #1285 squash-rebuild

Byte-exact restore of the rev-2 kickoff (PR #1283, 025aac0 — 3 rounds
of Phase -1 cold review, GO) that PR #1285's stale-base squash-rebuild
reverted to rev 1. The umbrella is closed; this repairs the historical
record its done.md cites.

Prior-art: skipped — restoration of already-merged reviewed content, no new capability

---------

Co-authored-by: Test <test@example.com>
artyhoo added a commit that referenced this pull request Aug 8, 2026
…es to outdated base blobs (#1285 class) (#1307)

* feat(hooks): pr-stale-revert check pair + tests

Deterministic PR-time gate for the stale-base squash-rebuild clobber class
(incident PR #1285, repaired by #1298): a PR that sets a tracked file to a blob
BYTE-IDENTICAL to an OLDER ancestor version of that file on the base branch is
silently discarding merged work. Nobody reproduces an old blob by hand by
accident, so the signature is mechanical and needs no judgment.

Every existing channel misses the class by construction: GitHub's "require
branches to be up to date" is POSITIONAL (the branch WAS up to date — the stale
content arrived as the PR's own change), no CI test covered the reverted content
(a merge queue shares that blindness), and the 21 reverted lines sat inside a
2498-insertion diff, i.e. bare attention.

- pr-stale-revert.ts: pure decision logic (git injected via StaleRevertGit) plus
  the PR-GLOBAL escape token `STALE-REVERT: intended — <rationale >=20 chars>`
  for deliberate restorations like #1298. The real provider is parameterised by
  cwd so tests and the calibration harness exercise the shipped code path.
- pr-stale-revert-bin.ts: CI glue reading PR_BODY / BASE_REF / BASE_SHA /
  HEAD_SHA. Fails CLOSED on its own misconfiguration — an unset env var, an
  unresolvable SHA, or an unresolvable merge-base all produce an EMPTY file set
  that is indistinguishable from "clean", so they error instead of passing.
- Tests: 38 arms, including two paired-negative arms over the real #1285
  archaeology and an end-to-end run of the shipped provider and the bin against
  a throwaway fixture repository reproducing the incident shape.

Declared v1 non-goals (rule §8 + SSOT #241 carry the revisit triggers): renames
are not followed, deletions are not flagged, and a stale file the PR ALSO edits
yields a novel blob and is undetectable by whole-file equality — in #1285 itself
setup.d/10-skills.sh would not flag; only the untouched kickoff.md does.

Calibration over the 150 staging squash commits back from 004864d: exactly 2
flags, both true positives (ab280e1 = #1285, 4fe20cc = #1298), zero false
positives.

Prior-art: prior-art-evaluations.md#241 (BUILD — no upstream detects PR-sets-file-to-outdated-base-blob; 9-phrasing WebSearch + DeepWiki git/danger-js + native-gates check all miss; see entry).

* ci(workflows): stale-revert-in-pr-diff gate on staging PRs

Wires packages/core/hooks/checks/pr-stale-revert-bin.ts as a PR-time job on
base=staging PRs, mirroring pr-body-fidelity.yml (same pinned action SHAs, node
22, npm ci --prefix packages/core, job id == job name so the operator registers
the string GitHub actually reports).

Two load-bearing details:

- The checkout sets BOTH `fetch-depth: 0` AND `ref: head.sha`. Without the
  explicit ref a `pull_request` checkout lands on the synthetic
  `refs/pull/N/merge` commit, where git has ALREADY merged the newer base
  content over the stale file — the signal is erased and the gate fails OPEN in
  exactly the scenario it exists for. Same trap documented at audit-self.yml's
  pr-commit-trailers job.
- Unfiltered events (the pr-body-prior-art.yml model): a `paths:` filter would
  un-fail-close exactly the docs/config PRs where this class hides. `edited` is
  included so adding the STALE-REVERT token re-runs the check.

The gate is ADVISORY until the operator registers `stale-revert-in-pr-diff` as a
required check in the staging branch-protection set; CI cannot verify that
registration (GITHUB_TOKEN cannot read branches/*/protection — the KNOWN
LIMITATION recorded in workflow-integrity.yml). Deterministic git plumbing, no
LLM. Verified with actionlint and zizmor (no findings).

Prior-art: skipped — CI wiring only for the detector shipped in the preceding commit; no new capability, no new dependency, no new module.

* docs(rules): git-conflict-merge-forward §8 stale-base rebuild hazard

Adds §8 for the sibling failure of the merge-forward class: the branch is NOT
behind — its CONTENT is. A squash-rebuilt PR (fresh fork + older tree committed
over it) silently reverts every file the base moved in between, which is how
#1285 discarded #1283 and #1284 before #1298 repaired it.

The section records the incident, the mechanical signature (head blob
byte-identical to an OLDER ancestor version on the base branch), the shipped
PR-time gate and its escape token, and both v1 non-goals with revisit triggers:
(a) renames/deletions, and (b) the edited-stale-file false negative — a stale
file the PR also edits yields a novel blob and is invisible to whole-file
equality, with setup.d/10-skills.sh in #1285 as the worked example.

Also reconciles the header's Class-B claim: «a CI principle test is structurally
unreachable» scopes the merge-forward PROCEDURE (a command choice, invisible to
repo CI); §8's hazard is PR-diff content lineage, which IS mechanically visible
at PR time and now has its own CI channel. The Authoritative-for enumeration
gains §8.

§1.7: forward — the new channel is a deterministic gate, not «a reviewer will read the diff», per attention-is-not-a-mechanism.md:15, and it fires at the earliest channel where the signature exists at all (a PR diff), with zero LLM per no-paid-llm-in-ci.md; the Class-B ceiling claim it qualifies is at .claude/rules/git-conflict-merge-forward.md:5, and the Authoritative-for enumeration was extended in the same edit per doc-authority-hierarchy.md §2-§3. Backward — sibling surfaces in the «agent-facing git/push gotchas» class are §2's trailer-gate range fix, the CLAUDE.md Harness-gates bullet, and the harvest/egress pre-publish rebase carve-out in §3: §8 extends the file's scope from «un-conflicting a branch» to «the branch looks fine and is silently stale», contradicting none of them; no other rule claims authority over PR-diff content lineage.

Prior-art: skipped — rule prose amendment documenting a gate shipped two commits earlier; no new capability, no dependency, no module.

---------

Co-authored-by: Test <test@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant