test(#6168): stop BT steps from using install.State config indirection - #6171
Conversation
Replace all step (and step-test fake) uses of ConfigOwner(), ConfigRepo(), and ConfigPathPrefix() with direct World fields: w.Org, w.RepoName, and hardcoded ".fullsend/" convention. Production step changes: - dispatch.go: 14 ConfigOwner/ConfigRepo calls → w.Org/w.RepoName - cleanup.go: 1 ConfigOwner/ConfigRepo call → w.Org/w.RepoName - dummy_agent.go: 1 ConfigOwner/ConfigRepo call → w.Org/w.RepoName - url_dispatch.go: 2 ConfigOwner/ConfigRepo calls → w.Org/w.RepoName - world.go: BehaviourScriptPath() now hardcodes .fullsend prefix instead of reading Install.ConfigPathPrefix() Test fake cleanup: - Remove fakeDispatchInstall (dispatch_test.go) - Remove fakeCleanupInstall (cleanup_test.go) - Remove fakeURLInstall (url_dispatch_test.go) - Update all affected tests to set w.Org/w.RepoName directly Workflow/artifact helpers (TriageWorkflowRepo, TriageWorkflowFile, AgentWorkflowFile, AgentArtifactName) remain on install.State as permitted by the issue — they are fixed per-repo constants. Closes #6168
|
🤖 Finished Review · ✅ Success · Started 9:58 AM UTC · Completed 10:09 AM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Previous runFindingsMedium
Previous runLooks good to me Labels: PR modifies behaviour test steps and world under pkg/behaviourtest/, which is the e2e test infrastructure. Previous runReviewFindingsMedium
Previous run (2)Looks good to me Labels: PR modifies behaviour test steps and world under pkg/behaviourtest/, which is the e2e test infrastructure. |
|
/fs-fix Add clear fail-fast errors when steps use |
|
🤖 Finished Fix · ✅ Success · Started 10:18 AM UTC · Completed 10:30 AM UTC Commit: |
Add checks at the top of functions that use w.Org / w.RepoName for SCM calls. Without these guards, an unset identity silently passes empty strings to the SCM driver, producing confusing API errors instead of a clear "no repo configured" message. Guarded functions: givenKillSwitchActive, DeactivateKillSwitch, givenCustomHarness, givenDisabledCustomHarness, commitLocalHarnessResources, parseDummyAgentTable, givenURLSourcedCustomHarness, and the cleanup dummy-ops path (logs instead of returning, since CleanupScenario is void). Addresses review feedback on #6171
🔧 Fix agent — iteration 1 (human-triggered)Added fail-fast empty-identity guards to all 8 functions (plus cleanup log-guard) that use w.Org/w.RepoName for SCM calls, matching the existing 'no repo configured' error style. Added 7 new test functions covering the guards. Fixed 2 existing tests that needed Org/RepoName set to pass the new guards. Fixed (12):
Tests: passedNext steps:
|
|
🤖 Finished Review · ✅ Success · Started 10:31 AM UTC · Completed 10:43 AM UTC Commit: |
|
/fs-fix |
|
🤖 Finished Fix · ✅ Success · Started 10:51 AM UTC · Completed 10:58 AM UTC Commit: |
The test was passing for the wrong reason: the empty-identity guard added in the previous commit fires before the name/doc validation check, so both error paths returned "no repo configured" instead of "harness name and contents are required". Set Org and RepoName on the World, matching the pattern in TestGivenURLSourcedCustomHarness_Validation. Addresses review feedback on #6171
🔧 Fix agent — iteration 2 (human-triggered)Fixed 1 review finding: TestGivenCustomHarness_Validation was testing the identity guard instead of the name/doc validation. Set Org/RepoName on the World to match the correctly-updated URL dispatch test. Fixed (1):
Tests: passedNext steps:
|
|
🤖 Finished Review · ✅ Success · Started 11:00 AM UTC · Completed 11:11 AM UTC Commit: |
|
🤖 Finished Retro · ✅ Success · Started 11:53 AM UTC · Completed 12:14 PM UTC Commit: |
Retro: PR #6171 — BT steps drop install.State config indirectionWorkflow outcome: Good. The pipeline worked well overall — 3 commits across 2 hours from creation to merge, with the review-fix-review loop catching a bug introduced by the fix agent. Timeline
What went well
Rework costThe fix agent's missed analogous test caused one extra review+fix cycle (~30 min of wall-clock time, ~2 additional agent runs). This is a well-known pattern. Evidence for existing issues (no new proposals needed)
|
Summary
Replace all behaviour-test step (and step-test fake) uses of
install.Stateconfig indirection (ConfigOwner(),ConfigRepo(),ConfigPathPrefix()) with direct World fields (w.Org,w.RepoName) and fixed.fullsend/conventions.Changes
ConfigOwner()/ConfigRepo()calls withw.Org/w.RepoNameacrossgivenKillSwitchActive,DeactivateKillSwitch,givenCustomHarness,givenDisabledCustomHarness, andcommitLocalHarnessResourcesConfigOwner()/ConfigRepo()call in dummy script cleanup withw.Org/w.RepoNameConfigOwner()/ConfigRepo()call inparseDummyAgentTablewithw.Org/w.RepoNameConfigOwner()/ConfigRepo()calls ingivenURLSourcedCustomHarnesswithw.Org/w.RepoNameBehaviourScriptPath()to hardcode.fullsendprefix instead of readingInstall.ConfigPathPrefix()fakeDispatchInstall,fakeCleanupInstall, andfakeURLInstalltypes; update all tests to setw.Org/w.RepoNamedirectlyTriageWorkflowRepo,TriageWorkflowFile, etc.) remain oninstall.Stateas permitted by the issueTesting
pkg/behaviourtest/stepstests pass (with-race)pkg/behaviourtest/worldtests passgo vetandgo buildcleanConfigOwner/ConfigRepo/Mode/ConfigPathPrefixreferences remain in step files or worldCloses #6168
Post-script verification
agent/6168-bt-steps-drop-state-indirection)fafb2df30a66eb2dfa0ae9e4dff6641bfebe41a4..HEAD)