fix: make export-stripped tests edition-aware so CI can go green - #28
Open
akindejuh wants to merge 1 commit into
Open
fix: make export-stripped tests edition-aware so CI can go green#28akindejuh wants to merge 1 commit into
akindejuh wants to merge 1 commit into
Conversation
CI has failed on every push to main since v2.7.194 (Jul 1). Both failures are the same shape: a test hardcodes an artifact that the public-export script strips, so the assertion can only pass in the platform build. TestNoBareGoFuncInWorkers reads a fixed list of worker files and calls t.Fatal on a read error. Four of the ten (backup_worker.go, marketing_drips.go, quarantine.go, builder_uploads.go) are platform-only, so the test died on the first missing file without scanning anything. The invariant it defends is "no bare go func in a worker file", not "every file in this list exists" - so absent files are now skipped and the six that do ship are still scanned. A scanned==0 guard keeps the test from passing vacuously if the list ever drifts entirely out of date. TestAgentDocs_TopicsList asserted an exact [build deploy] pair, but deploy.md is the cloud-edition ship guide and is not embedded in the framework build. Rather than weaken the check to nothing, it now asserts the invariants that hold in every edition: build is always present, every topic present is one that was deliberately declared, and the list is sorted. An undeclared new topic still fails, which was the point. No production code changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CI has failed on every push to
mainsince v2.7.194 (Jul 1) — v2.7.194, 196, 197, 200, 203 are all red. Both failures are the same shape: a test hardcodes an artifact that the public-export script strips, so the assertion can only ever pass in the platform build.This is pure test drift. No production code changes.
TestNoBareGoFuncInWorkersReads a fixed list of ten worker files and calls
t.Fatalon a read error. Four are platform-only and absent here:So the test died on the first missing file having scanned nothing — the bare-
go funcguard hasn't actually run in this edition for months.The invariant it defends is "no bare
go funcin a worker file", not "every file in this list exists". Absent files are now skipped and the six that ship are scanned. Ascanned == 0guard keeps it from passing vacuously if the list ever drifts entirely out of date.TestAgentDocs_TopicsListAsserted an exact
[build deploy]pair, butAgentDocsTopics()reads embeddeddocs/agent/*.mdanddeploy.mdis the cloud-edition ship guide — not in this tree.Rather than weaken the check to nothing, it now asserts what holds in every edition:
buildis always present, every topic present was deliberately declared, and the list is sorted. An undeclared new topic still fails, which was the original intent ("a new topic is a deliberate act").Verification
First green run on this tree since July.
Note
#27 is red for exactly these two failures and nothing else. Merging this first, then rebasing #27, should take both green.
🤖 Generated with Claude Code