Skip to content

Commit e003473

Browse files
authored
docs: describe the CodeQL gate that is actually in place (#43)
Follow-up to the CodeQL centralisation. The operational docs still describe the gate that was replaced. ## What was stale CodeQL now calls the org's reusable analysis in `bymaxone/.github`, which resolves the repository's visibility **through the API** rather than through `github.event.repository.private`. The docs still described the expression form. The autopilot notes were wrong in a way an agent would act on: they predicted **two skipped checks** while the repo is private. The reusable reports one that **runs and passes** (`codeql / Repository visibility`) and one that **skips** (`codeql / Analyze (<language>)`). ## Why the API instead of the expression The `schedule` event carries no webhook payload — GitHub lists it as *Not applicable* — so `github.event.repository` is null there and `!null` evaluates to **true**. The expression form therefore fails open on the weekly run: a private repository would analyse and then fail at the SARIF upload. ## What was deliberately not changed **Scorecard's description.** It still uses `if: ${{ !github.event.repository.private }}`, so rewriting both mentions would have traded one wrong sentence for another. Its description now stands on its own. **`docs/tasks/phase-00-*` and CHANGELOG entries.** Those record what was built at the time. Editing them would misstate the history rather than fix a stale instruction — a reader looking for what phase 00 delivered should find phase 00, not today.
1 parent 1b3ae0d commit e003473

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

docs/AUTOPILOT.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ compose stack at a time (`docker compose down` between profile switches -
100100
ports 3001/3002/8080/6379 collide).
101101

102102
**Expected-skip CI checks**: `codeql.yml` and `scorecard.yml` are committed
103-
from phase 00 but gated on `if: ${{ !github.event.repository.private }}`.
104-
While the repo is private they report **skipping** and count as pass, never
105-
as a failure. The cluster E2E job is behind `workflow_dispatch` until stable
103+
from phase 00 and produce no findings while the repo is private, but they gate
104+
differently. `codeql.yml` calls the org's reusable analysis, whose
105+
`codeql / Repository visibility` job **runs and passes** on every trigger while
106+
`codeql / Analyze (<language>)` skips; `scorecard.yml` gates on
107+
`if: ${{ !github.event.repository.private }}` and skips outright. A skipped job
108+
counts as pass, never as a failure. The cluster E2E job is behind `workflow_dispatch` until stable
106109
(a non-run is not a failure).
107110

108111
## Invariant greps

docs/TECHNICAL_SPECIFICATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ nginx rules (the honest part):
548548
The repository is **private today and will become public**. CI is written once, with public-only features gated, never deleted:
549549

550550
- `ci.yml` (always on): install, typecheck, lint, unit (both apps, sequential steps), build, E2E job with a `redis:7` service container (cluster E2E behind a manual/`workflow_dispatch` trigger until runners prove stable).
551-
- `codeql.yml` and `scorecard.yml`: full workflows committed from day one, gated with a repository-visibility condition (`if: ${{ !github.event.repository.private }}`) so they activate automatically when the repo flips public. No secrets in code; demo values only.
551+
- `codeql.yml` and `scorecard.yml`: committed from day one and gated on repository visibility, so they activate automatically when the repo flips public. CodeQL calls the org's reusable analysis, which resolves visibility through the API, so the answer is the same on every trigger; Scorecard uses `if: ${{ !github.event.repository.private }}`. No secrets in code; demo values only.
552552
- Every phase merges through a PR with GitHub Copilot review requested and all findings addressed; CI green is a merge precondition from the very first PR.
553553

554554
## 20 · Out of Scope

0 commit comments

Comments
 (0)