Skip to content

Wire the repo-factory phase gate into CI - #105

Closed
MongLong0214 wants to merge 2 commits into
devfrom
feat-issue-103
Closed

MongLong0214 wants to merge 2 commits into
devfrom
feat-issue-103

Conversation

@MongLong0214

Copy link
Copy Markdown
Owner

Closes #103.

`phase-gate.py` (repo-factory skill's Phase 4/5/6 completion gate, used to
decide when this project and gitseed have finished a phase) lives at
`~/.claude/skills/repo-factory/scripts/`, a path no CI runner can reach.
`docs/ROADMAP-TO-DONE.md` (Goal 3) recorded this as outstanding. This adds
`.github/workflows/phase-gate.yml`, which fetches the script from a new
public mirror (`MongLong0214/repo-factory-gate`) pinned by commit SHA +
sha256 and runs it with `GH_TOKEN` set, so the gate that decides phase
completion can actually run -- and fail the build -- on the runner. Also
updates the ROADMAP row to record the resolution.

  • Phase 4 / 5: `workflow_dispatch` (on-demand — Phase 5's own condition is
    false for most of an active wave by construction: Phase 4: design and run M4 after M3 was voided #52 is open right now,
    non-Backlog, correctly)
  • Phase 6: also automatic on every `vX.Y.Z` tag push (its conditions stay
    met once met)

Options ruled out (also recorded as commit trailers): vendoring a copy into
this repo and gitseed (a second copy free to drift from CommitLore's own
copy of the same trust logic — the defect class #89/#90 closed); moving the
gate into this repo and having the skill reference it (inverts the
dependency).

Not merging to `dev` myself per instructions — this is for review.

phase-gate.py decides Phase 4/5/6 completion by checking local docs plus
live GitHub state, and has always exited nonzero on failure -- but it lives
at ~/.claude/skills/repo-factory/scripts/, a path no CI runner can reach.
docs/ROADMAP-TO-DONE.md (Goal 3) recorded this as outstanding: CI use
required vendoring, and nobody was doing it. That made the gate advisory in
exactly the place a gate should be binding.

Adds .github/workflows/phase-gate.yml: fetches phase-gate.py from a new
public mirror (github.com/MongLong0214/repo-factory-gate) pinned by commit
SHA + sha256, then runs it with GH_TOKEN set so gh-backed checks answer for
real instead of reporting "auth failed" as an explicit FAIL. Phase 4/5 run
on workflow_dispatch (on-demand); Phase 6 also runs automatically on every
vX.Y.Z tag push, since its conditions stay met once met. Updates the
ROADMAP-TO-DONE.md row to record the resolution and what was ruled out.

Fixes #103

Ruled-out: vendor phase-gate.py into this repo and gitseed | second copy free to drift from CommitLore's own trust logic -- the defect class #89/#90 closed
Ruled-out: move the gate into this repo, have the skill reference it | inverts the dependency -- a project should not own the factory's gate
Ruled-out: gate every dev push on Phase 4/5 | Phase 5's own condition (#52 open, non-Backlog) is false mid-wave by construction; trains reviewers to ignore CI
Limit: the mirror repo is published-to, not edited directly -- patch the skill, then re-publish
Evidence: docs/ROADMAP-TO-DONE.md#goal-3--factory-skill
Blast: module
Certainty: firm
@github-actions

github-actions Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

CommitLore — record lint

Trailers: clean — 2 commits in origin/dev..aa89670801d20b136a604f51e226efd96f093d23
Active constraints: 1 limits · 5 ruled-out · 3 warnings — from 4 records over 2 changed paths

Active constraints for the paths this PR touches

Limits (1)

  • - c993bda — the mirror repo is published-to, not edited directly -- patch the skill, then re-publish

Ruled out (5)

Warnings (3)

  • r-3b57e2 30f2d5f (claim) — bench/PREREGISTRATION.md is append-only and was translated in place. Its section numbering and order are unchanged, but a translation is still an edit to a file whose whole discipline is that it is not edited. Recorded here rather than left to be noticed
  • r-5a83e9 1c683df (claim) — the claim that gitseed's rejected alternatives will produce a higher control base rate is a prediction, not a measurement. The qualification round exists to test it, and it may say no
  • r-1a63f5 2bb4993 (claim) — "CI is green" was said five times today against a red CI, including in the commit that introduced the rule saying to check CI before saying it. The rule is in docs/RELEASE-GATE.md §5 and it was not followed by its own author. This commit is not claiming CI is green; that claim comes after the run reports

git log --follow accepts exactly one pathspec, so renames are not followed for 2 paths; query one path at a time to follow its rename chain

Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR.

Gives a real, permanent trigger for the ship gate beyond tag pushes -- and,
practically, a way to see this workflow actually execute on GitHub's
runners without merging to dev first (workflow_dispatch only becomes
callable once a workflow file exists on the default branch, so it cannot be
exercised from a feature-branch PR by itself).

Fixes #103
@MongLong0214

Copy link
Copy Markdown
Owner Author

Closing: repo-factory's scope is idea-to-initial-repo only (concretize an idea, then set up/configure the repo until it's ready for work to begin). Wave execution and shipping are not its job, and the skill must not couple to any project's CI. This PR was the wrong direction — reverting.

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.

CI cannot run the repo-factory phase gate — it lives outside the runner's reach

1 participant