Skip to content

feat(ci): polyglot stack + snapshot-refresh + lane summary + ci:full (F14)#23

Merged
ArchonVII merged 3 commits into
mainfrom
agent/claude/8-gate-lanes-polyglot-snapshot
May 21, 2026
Merged

feat(ci): polyglot stack + snapshot-refresh + lane summary + ci:full (F14)#23
ArchonVII merged 3 commits into
mainfrom
agent/claude/8-gate-lanes-polyglot-snapshot

Conversation

@ArchonVII

Copy link
Copy Markdown
Owner

Summary

Closes #8. Extends repo-required-gate.yml (the F14 aggregator) with three new lanes plus an explicit escape hatch, and surfaces lane decisions in the GitHub UI. Driven by the Iridescent-Church plan (2026-05-20) and PR-history analysis: workflow-only is the largest under-routed bucket (~11 of 86 sampled PRs), snapshot-refresh is a clean recurring shape in archon-setup, and the highest-volume consumer (comfyui-companion) has no Python CI today.

Three commits, atomic:

  1. feat(scripts) — pure classifier (scripts/classify-pr.mjs) with 40 vitest fixtures.
  2. feat(ci) — rewrite repo-required-gate.yml to dynamic-import the classifier, add polyglot stack, snapshot-refresh lane, lane summary, ci:full label override.
  3. docs(examples) — show all caller shapes including polyglot and snapshot-refresh.

Guardrail compliance

# Guardrail Implementation
1 One required check stays one Per-lane jobs (node-ci, python-ci, workflow-validation, snapshot-validation, etc.) remain conditional under decision. Branch protection on consumer repos still requires only repo-required-gate / decision.
2 ci:full escape hatch New force-full-ci-label input (default ci:full). Forces both language CIs regardless of path routing. Case-insensitive match.
3 snapshot-only means EVERY file matches Classifier emits snapshot-only: true only when names.every(...). One non-matching file falls through to full language CI. Test fixture #12 explicitly covers the mixed case.
4 Polyglot path inputs default empty node-paths: "" and python-paths: "" defaults. stack=polyglot with both empty fails fast (test #15).
5 Mandatory lane visibility Detect job emits core.notice('Lane: <name>') + a $GITHUB_STEP_SUMMARY block listing lane label, changed files, jobs required, and jobs skipped. Ships day one in this PR, not as a follow-up.

Lanes

The classifier picks ONE of these, by priority:

  1. forced-full (label: ci:full) — user override
  2. snapshot-refresh — every file matches snapshot-paths
  3. docs-only — every file is a doc file (and not a policy file)
  4. workflow-only — every file is .github/workflows/** or .githooks/**
  5. policy-only — every file is AGENTS.md / CLAUDE.md / GEMINI.md / .agent/**
  6. code (node) / code (python) / code (polyglot: …) — language CI fans out per touched workspace
  7. pass-through — no matching files (rare)

Backward compatibility

Existing stack: minimal / stack: node / stack: python consumers see no behavior change. The minimal-stack invariant (code change on stack=minimal → error) is preserved as a classifier fail-fast (test #27b).

Verification

Verification Notes

  • All 40 new vitest fixtures pass plus the 16 existing parse-evidence tests (56 total).

    ```evidence
    command: npx vitest run scripts/
    location: local
    result: 56/56 pass; 0 failures
    timestamp: 2026-05-20T20:55:56Z
    ```

  • Three atomic commits on agent/claude/8-gate-lanes-polyglot-snapshot, each one logical unit per CLAUDE.md atomic-commit rule.

    ```evidence
    command: git log --oneline agent/claude/8-gate-lanes-polyglot-snapshot ^main
    location: local
    result: 3 commits — 4d96941 feat(scripts), 9c71117 feat(ci), 0f40319 docs(examples)
    timestamp: 2026-05-20T20:57:30Z
    ```

  • Actionlint passes on the rewritten workflow (will run via this repo's actionlint.yml workflow on this PR — needs CI verification).

  • Self-test (self-test.yml) runs the new vitest fixtures on PR via the scripts/** path filter — needs CI verification.

Rollout sequence (post-merge)

Per [[playbook-ecosystem-capability-rollout]]:

  1. Merge this PR.
  2. Force-move v1 tag to the merge SHA (also picks up the pending F2/F10 hotfix that's been waiting since 2026-05-20).
  3. Open PR 2 in comfyui-companion to adopt stack: polyglot with explicit node-paths/python-paths for server/, web/, electron/, analysis-service/.
  4. Open PR 3 in archon-setup to add its first .github/workflows/ directory + test:snapshots script, then npm run refresh-snapshots.
  5. Owner-maintenance: update docs/phase2/hook-authority.md to mark F14 resolved.

Do NOT promote any per-lane job to a required branch-protection check (Guardrail #1).

🤖 Generated with Claude Code

ArchonVII and others added 3 commits May 20, 2026 20:56
Pure ES-module classifier that decides which lane a PR routes to:
docs-only, workflow-only, policy-only, snapshot-refresh, code lanes,
or forced-full. Mirrors the parse-evidence.mjs pattern (pure function,
dynamic-import from the workflow caller).

40 vitest fixtures cover every lane plus the Iridescent-Church
guardrails: snapshot-only requires EVERY file to match (#3), polyglot
fails fast on empty path lists (#4), ci:full label override beats every
other lane (#2), and stack=minimal+code preserves the legacy invariant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
)

Routes PRs to the smallest lane that still gives real signal. Replaces
the inline detect-step JS with a dynamic-import of scripts/classify-pr.mjs
(same pattern as pr-policy + parse-evidence). The single required check
remains `repo-required-gate / decision`; per-lane jobs stay conditional
under it.

New inputs:
- stack: polyglot — fans out to node-ci and/or python-ci based on which
  caller-declared workspace paths the PR touched. node-paths and
  python-paths default empty; consumers MUST declare at least one when
  stack=polyglot (fail-fast, Guardrail #4).
- snapshot-paths + snapshot-test-command — PRs whose EVERY file matches
  snapshot-paths skip language CI and run the consumer's snapshot test
  instead (Guardrail #3, ALL files must match).
- force-full-ci-label (default `ci:full`) — Release-Admiral's escape
  hatch when a workflow-only PR could still break CI semantically
  (Guardrail #2).
- workflow-library-ref (default `v1`) — pins the classifier checkout to
  the same ref callers pin this workflow at.

Detect job now emits a one-line core.notice + step-summary block with
the lane label, changed files, and required/skipped job list so the
routing decision is legible from the Actions list view (Guardrail #5).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Consumers can copy the relevant block for their stack. Also adds
`labeled, unlabeled` to the pull_request event types so applying the
ci:full label on an open PR triggers a fresh gate run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ArchonVII
ArchonVII marked this pull request as ready for review May 21, 2026 14:27
@ArchonVII
ArchonVII merged commit e07181b into main May 21, 2026
1 check passed
@ArchonVII
ArchonVII deleted the agent/claude/8-gate-lanes-polyglot-snapshot branch June 5, 2026 04:10
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.

F14: Adopt single targeted-ci-gate required check for path-filtered CI

1 participant