Items 35 (compile), 36 (dream-cycle), 37 (Athena follow-up) from
.agents/research/2026-05-03-top-50-ci-failures.md all share the same compile
substrate and exhibited the same 13% nightly red rate when the upstream corpus
had zero citation activity in the measurement window. Three separate jobs
produced three separate artifacts and three independent spurious-red signals
on the same underlying dormant-corpus condition.
Consolidate into a single `knowledge-cycle` job that:
- Calls a new `scripts/nightly-knowledge-cycle.sh` precondition substrate
before any compile/dream/Athena stage. When
`total_citations_in_window == 0 && total_artifacts > 0` (read from
`ao metrics report --json` .citations_this_period and .total_artifacts), the
cycle SKIPs every downstream stage with reason `corpus-dormant` rather than
failing — implements `f-2026-04-30-002`.
- Records each stage (compile-mine, compile-defrag, compile-health,
dream-cycle, athena) into one consolidated `triage.json`/`triage.md` and
uploads a single `nightly-knowledge-cycle` artifact in place of the three
prior `compile-report`, `dream-cycle-report`, and (referenced) Athena
artifacts.
- Replaces the prior `Nightly dream cycle status` issue with a single
`Nightly knowledge-cycle status` issue.
- Updates the summary job's `needs:` and fail-condition to track only the new
`knowledge-cycle` job.
The 5-consecutive-nightlies acceptance criterion (green-or-SKIPPED with no
spurious red) is time-deferred — this commit lands the substrate; the
observation gate closes after 5 nightly runs.
Updates:
- scripts/nightly-knowledge-cycle.sh: new shared substrate (precondition,
record-stage, read-decision subcommands)
- .github/workflows/nightly.yml: replace `compile` + `dream-cycle` jobs with
one `knowledge-cycle` job; consolidate artifact + issue creation; update
summary needs/failset
- AGENTS.md: add Nightly Workflow Jobs subsection documenting the deduped
knowledge-cycle job, the corpus-dormant precondition, and the
NIGHTLY_KNOWLEDGE_CYCLE_FORCE escape hatch
Validation:
- python3 yaml.safe_load: OK on .github/workflows/nightly.yml
- shellcheck scripts/nightly-knowledge-cycle.sh: PASS
- bash scripts/pre-push-gate.sh --fast: PASS
- substrate smoke (RUN path): decision=RUN, citations=2642, artifacts=526
- substrate smoke (SKIP path with mocked dormant corpus): decision=SKIP,
read-decision exit code 78
Refs: bd soc-2xmg; .agents/plans/2026-05-03-ci-failures-1-40-handling.md
§nightly-knowledge-cycle-dedupe; .agents/findings/f-2026-04-30-002.md;
.agents/research/2026-05-03-top-50-ci-failures.md items 35, 36, 37
(cross-ref item 39 Static Validation as DEFER)