Skip to content

Add a fast CI job for embed.FS drift detection before the full test suite #263

Open

Description

@fullsend-ai-retro

What happened

On PR #256, the embedded asset drift was caught by a human reviewer before CI ran, but the fix was a manual process. The repo has TestEmbeddedAssetsMatchSource (in internal/scaffold/scaffold_test.go) which catches this drift, but it runs as part of the full go test suite. The review agent does not run tests and therefore could not benefit from this signal. The human reviewer's domain knowledge substituted for the missing CI signal.

What could go better

A lightweight pre-review CI check that diffs .opencode/ files against internal/scaffold/assets/ would provide an instant signal — no Go compilation or test execution required. This would catch drift in seconds rather than waiting for the full test suite, and would generate a CI status check visible to both the review agent and human reviewers. Confidence: high — the check is trivially implementable as a shell diff comparison, and the file list is already enumerated in TestEmbeddedAssetsMatchSource.

Proposed change

Add a fast CI job to .github/workflows/test.yml (or a new workflow) that runs a simple shell diff between the two file sets before the full test suite. Example:

jobs:
  asset-drift:
    name: Embedded Asset Drift Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@<sha>
      - name: Check scaffold asset sync
        run: |
          failed=0
          for f in internal/scaffold/assets/**/*.md internal/scaffold/assets/**/*.jsonc; do
            src=".opencode/${f#internal/scaffold/assets/}"
            if [ -f "$src" ] && ! diff -q "$src" "$f" >/dev/null 2>&1; then
              echo "DRIFT: $src differs from $f"
              echo "  Fix: cp $src $f"
              failed=1
            fi
          done
          exit $failed

This runs in under 1 second and catches drift before the review agent or human reviewer even starts. The check would also validate the internal/aireport/assets/agents/gaze-reporter.md ↔ internal/scaffold/assets/agents/gaze-reporter.md copy.

Validation criteria

After adding the CI job, submit a test PR that intentionally drifts one embedded asset (e.g., add a comment to .opencode/agents/gaze-reporter.md without updating internal/scaffold/assets/agents/gaze-reporter.md). The new CI job should fail within 30 seconds with a clear remediation message. Verify that the full test suite's TestEmbeddedAssetsMatchSource also catches it (confirming redundancy, which is desirable for defense in depth).


Generated by retro agent from #256

Activity

  1. added
    ready-for-triage
    on Sep 15, 2026
  2. fullsend-ai-triage commented on Sep 15, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 10:04 AM UTC · Completed 10:08 AM UTC

    Commit: 0e64f36 · View workflow run →

    Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.04

  3. fullsend-ai-triage commented on Sep 15, 2026

    @fullsend-ai-triage

    ⚠ Workflow change required — manual intervention needed.

    This issue requires modifying .github/workflows/test.yml (or adding a new workflow file). The code agent cannot modify workflow files under current permissions. A human must author the PR or a maintainer must make the change directly.

    Implementation notes

    • The 9 asset paths are already enumerated in TestAssetPaths_Returns9Files — the CI job should mirror this list.
    • Don't forget the secondary sync: internal/aireport/assets/agents/gaze-reporter.md ↔ internal/scaffold/assets/agents/gaze-reporter.md (enforced by TestEmbeddedPromptMatchesScaffold).
    • The job needs only actions/checkout — no Go toolchain required, making it fast (~1s).

    Related


    Labels: CI enhancement request for a new workflow job; matches the enhancement label used for feature/improvement issues in this repo.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  4. jflowers commented on Nov 1, 2026

    @jflowers
    Collaborator

    Divisor Issue Triage

    Verdict: VALID — 7/7 reviewer personas
    Category: enhancement
    Objectivity: objective (verifiable in-repo evidence)
    Duplicate: none
    Split: none

    The proposed CI job needs no Go toolchain: actions/checkout plus a comparison against the nine asset paths already enumerated in TestAssetPaths_Returns9Files runs in roughly a second. The job must also cover the secondary sync invariant internal/aireport/assets/agents/gaze-reporter.md ↔ internal/scaffold/assets/agents/gaze-reporter.md, which TestEmbeddedPromptMatchesScaffold enforces.

    Related: #262 proposes documenting these sync invariants in AGENTS.md, which complements this job. The enhancement label is already applied.

    This triage was performed by the Divisor review panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfeatureready-for-triagetriaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions