fix(#6557): detect scaffold content drift in repos status - #6559
Conversation
|
🤖 Finished Review · ✅ Success · Started 6:42 PM UTC · Completed 7:02 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $7.16 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Looks good to me Previous runLooks good to me Previous run (2)ReviewFindingsMedium
Low
Next steps:
Previous run (3)ReviewFindingsMedium
Low
|
|
/fs-fix Rebase and fix all the review issues. |
|
🤖 Finished Fix · ❌ Failure · Started 9:21 PM UTC · Completed 9:30 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.82 |
|
The fix agent completed, but the post-fix script failed before finishing. Workflow run: https://github.com/fullsend-ai/fullsend/actions/runs/32778875041 Details: |
|
/fs-fix - Rebase and fix all review issues. CRITICAL: Do not use a signed-off by trailer on the commit. |
|
🤖 Finished Fix · ✅ Success · Started 11:34 PM UTC · Completed 11:43 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.24 |
🔧 Fix agent — iteration 1 (human-triggered)Addressed all 9 review findings (2 medium, 7 low). Fixed error handling to match codebase idioms (forge.IsNotFound checks, status.Error propagation), corrected British-to-American spelling, replaced panic with t.Fatal in test helper, removed single-use alias, documented incomplete parity limitation, and updated three documentation files to mention scaffold content drift. All tests pass with -race. Rebase could not be performed due to sandbox network restrictions. Fixed (9):
Tests: passedNext steps:
|
- Check forge.IsNotFound before continuing in workflow-path fallback loop, propagating unexpected errors via status.Error (matches readWorkflowContent pattern) - Set status.Error when ExpectedScaffoldContent returns an error instead of silently skipping the content-drift check - Rename NORMALISED_REF to NORMALIZED_REF and update comments to use American English spelling consistently - Change populateInstalledRepo to accept testing.TB and use t.Fatal instead of panic, matching test helper conventions - Remove single-use forgeName alias, pass cfg.Forge directly - Document RunnerTags/PrebuiltScaffoldFiles omission in ExpectedScaffoldContent doc comment - Update DRIFT column description in docs/cli/repos.md to mention scaffold content drift - Update repos status description in operations.md and repo-management.md to mention scaffold content drift Addresses review feedback on #6559
|
🤖 Review · ❌ Terminated · Started 11:45 PM UTC · Ended 12:02 AM UTC Commit: |
Site previewPreview: https://28a78c27-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 11:45 PM UTC · Completed 12:02 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.51 |
|
🤖 Finished Fix · ✅ Success · Started 12:04 AM UTC · Completed 12:16 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.46 |
🔧 Fix agent — iteration 2 (bot-triggered)Addressed all 3 review findings: added early return after checkScaffoldContentDrift for error-handling consistency, documented VendorBinary in the limitation note, and added an independent-construction test to address the test-tautology concern. Fixed (3):
Tests: passedNext steps:
|
- Add early return after checkScaffoldContentDrift when status.Error is set, matching the pattern used by every other error assignment in checkRepoStatus. Prevents the region read from overwriting scaffold errors. - Add VendorBinary to the limitation note in ExpectedScaffoldContent's doc comment, documenting the false-positive risk for vendor-mode repos. - Add TestStatus_NoContentDrift_IndependentInstalledContent which constructs installed content independently (via regex ref replacement, not BuildScaffoldFiles) to verify normalization and comparison logic end-to-end, addressing the test-tautology concern. Addresses review feedback on #6559
|
🤖 Finished Review · ✅ Success · Started 12:17 AM UTC · Completed 12:32 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.52 |
Superseded by updated review
Add content-drift detection to `repos status` so that template changes (new jobs, permissions, thin-caller restructuring) are reported even when the ref string matches the manifest. Previously, status only checked scaffold files for presence and ref equality, making template changes invisible for branch-ref targets like `fullsend_ref: main`. Add `ExpectedScaffoldContent` in install.go — a shared function that renders expected scaffold files using `BuildScaffoldFiles` with the manifest's resolved config. The status path calls this and compares each rendered file against the installed content. Refs are normalised via `replaceShimRef` before comparison so ref-format differences do not produce false content-drift reports. Update the `populateInstalledRepo` test helper to use `BuildScaffoldFiles` for realistic scaffold content, ensuring existing no-drift tests remain accurate. Closes #6557
- Check forge.IsNotFound before continuing in workflow-path fallback loop, propagating unexpected errors via status.Error (matches readWorkflowContent pattern) - Set status.Error when ExpectedScaffoldContent returns an error instead of silently skipping the content-drift check - Rename NORMALISED_REF to NORMALIZED_REF and update comments to use American English spelling consistently - Change populateInstalledRepo to accept testing.TB and use t.Fatal instead of panic, matching test helper conventions - Remove single-use forgeName alias, pass cfg.Forge directly - Document RunnerTags/PrebuiltScaffoldFiles omission in ExpectedScaffoldContent doc comment - Update DRIFT column description in docs/cli/repos.md to mention scaffold content drift - Update repos status description in operations.md and repo-management.md to mention scaffold content drift Addresses review feedback on #6559
- Add early return after checkScaffoldContentDrift when status.Error is set, matching the pattern used by every other error assignment in checkRepoStatus. Prevents the region read from overwriting scaffold errors. - Add VendorBinary to the limitation note in ExpectedScaffoldContent's doc comment, documenting the false-positive risk for vendor-mode repos. - Add TestStatus_NoContentDrift_IndependentInstalledContent which constructs installed content independently (via regex ref replacement, not BuildScaffoldFiles) to verify normalization and comparison logic end-to-end, addressing the test-tautology concern. Addresses review feedback on #6559
775c4a4 to
ed6204e
Compare
|
🤖 Finished Review · ✅ Success · Started 12:36 AM UTC · Completed 12:48 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.20 |
Summary
Add scaffold content-drift detection to
repos statusso that template changes (new jobs, permissions, thin-caller restructuring) are reported even when the ref string matches the manifest. For branch-ref targets likefullsend_ref: main, the ref never changes, so template drift was previously invisible.Related Issue
Closes #6557
Changes
ExpectedScaffoldContent()ininstall.go— renders expected scaffold files from the manifest's resolved config usingBuildScaffoldFiles, shared by both the status and converge pathscheckScaffoldContentDrift()instatus.go— compares installed scaffold content against expected templates, normalising refs viareplaceShimRefbefore comparison to avoid false positives from ref-format differencescheckScaffoldContentDriftfromcheckRepoStatusafter existing component and ref drift checkspopulateInstalledRepotest helper to useBuildScaffoldFilesfor realistic scaffold content so existing tests remain accurate with content-drift detection enabledTesting
TestStatus_*tests pass unchangedinternal/repostest suite passes with-raceExpectedScaffoldContent,checkScaffoldContentDrift)go vetcleanCloses #6557
Post-script verification
agent/6557-scaffold-content-drift)1ad2c76a216f6776e2e97a1bef7739fd863ce457..HEAD)