Skip to content

Observe the Go cache write policy natively in required CI #570

Closed

Description

@devantler

🤖 Generated by the Agentic Engineer

Problem and impact

The Go cache write policy from #569 (one module-cache writer on the default branch, no cache writes from pull requests) is guarded by a static check of the workflow text with rejected mutations. Nothing in CI observes what the runner actually did, so a change in how GitHub evaluates the save conditions, or in the cache action's behaviour, would not fail a pull request. The native behaviour was read by hand once (see #569).

Expected outcome

A required CI job observes the real steps of the catalogue's own Go validation run and fails when they contradict the policy:

  • On a pull request: every Go job's module-cache restore step ran, and no Go cache save step ran in any job.
  • On the default branch: the Test job's module-cache save ran on a miss, and exactly one module archive exists for that key afterwards; a second run with unchanged dependencies restores it and saves nothing.

Notes for whoever picks this up

  • The fixture the Go validation callers use has no dependencies, so its module archive would be empty. A real main-branch save needs a fixture with at least one dependency, or a dedicated caller on one of the fixtures that already has dependencies.
  • A new job must be added to the test inventory, the affected-test selection and both places of the required-check reducer; the parity and selection guards enforce this.
  • The organisation-required direct invocation cannot be exercised from this repository's own CI. Its evidence comes from a consumer run and is recorded on Bound Go cache writes while preserving main-backed restores #565.

Acceptance criteria

  • A required job reads the current run attempt's jobs and asserts the step outcomes above, with complete pagination and fail-closed handling of missing jobs.
  • A negative control shows the observer fails when a pull-request run reports a Go cache save.
  • The default-branch observation proves a real, non-empty module archive is written once.

Part of #565.

Priority rationale: Medium: enforce the delivered cache write policy against actual runner behavior before a regression creates redundant archives. Existing static controls remain enabled. Native Effort is Medium for the observer, its failure controls and required-CI integration.

First started: 2026-10-12. The maintainer explicitly approved this one bounded implementation WIP exception in the interactive session. It does not admit further starts.

Use the existing dependency-bearing PostgreSQL caller from #574. The observer reads only this public catalogue's current run attempt, complete job pages, action logs and exact main archive. Consumer adoption and the full KSail cache-budget measurement remain #565 / devantler-tech/ksail#7348; no budget conclusion follows from this CI guard.

Delivery and verification

Merged #576 at 0ab32e7c094026a234d06c8c2dab84c81e33cfd7; the supporting PostgreSQL lifecycle repair #581 merged at 9ff2ad68306cc73df6814861c7804a11a25e0788. The current catalogue release v7.10.3 resolves to that verified merge.

Native PR CI observed all eight module restores and no Go archive saves. Regression controls reject a PR save, missing/partial/duplicate job evidence and unbound restores, including old/new CLI log-download interfaces.

The first real main producer 38300507280 saved a nonempty archive. Current-main observer 38317347126, attempt 1 passed at 9ff2ad68306cc73df6814861c7804a11a25e0788: all eight restores; Test restored the exact module key and skipped its module save. The complete exact-key main cache read still shows the same one archive, ID 8851118866, created at 2026-10-12T19:55:49.196513Z, containing 14,519,689 bytes. It was reused, not replaced or duplicated.

Complete main CI passed with 204 successful checks, 54 intentional skips and zero pending/failed checks; CI - Required Checks is present and successful. This completes the catalogue observer slice. Consumer adoption and the KSail budget measurement remain #565 / devantler-tech/ksail#7348.

Activity

  1. moved this to 📥 Backlog in 🌊 Project Boardon Oct 12, 2026
  2. added theissue type on Oct 12, 2026
  3. self-assigned this
    on Oct 12, 2026
  4. added a commit that references this issue on Oct 12, 2026
  5. updated Start date 2026-10-12, Priority Medium and Effort Medium on Oct 12, 2026
  6. moved this from 📥 Backlog to 🏃🏻‍♂️ In Progress in 🌊 Project Boardon Oct 12, 2026
  7. added 2 commits that reference this issue on Oct 12, 2026
  8. moved this from 🏃🏻‍♂️ In Progress to 👀 In Review in 🌊 Project Boardon Oct 12, 2026
  9. moved this from 👀 In Review to ✅ Done in 🌊 Project Boardon Oct 12, 2026
  10. moved this from ✅ Done to 🫴 Ready in 🌊 Project Boardon Oct 12, 2026
  11. added a commit that references this issue on Oct 12, 2026
  12. moved this from 🫴 Ready to 📊 Verifying in 🌊 Project Boardon Oct 12, 2026
  13. devantler commented on Oct 12, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    #576 merged at evaluated head fb2626075da387ecd425d52e6a15096bd065a790, producing verified main commit 0ab32e7c094026a234d06c8c2dab84c81e33cfd7. Its 282-check census and current-head Codex review were green, with all findings resolved. The required native observer ran successfully on the PR.

    The Fixes line closed this issue automatically. Reopened for the immediate post-merge checkpoint: main CI 38312718683 must execute the new required observer, prove the exact non-empty module archive is reused without saving it again, and complete required CI. The live verification stage had one open non-Epic card against its limit of three; this checkpoint is in Verifying and preserves the original start.

    No whole-consumer cache-budget conclusion follows. #565 retains that separate adoption and measurement gate.

  14. added a commit that references this issue on Oct 12, 2026
  15. moved this from 📊 Verifying to ✅ Done in 🌊 Project Boardon Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

Medium

Start date

Oct 12, 2026

Effort

Medium

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions