Skip to content

test: CI drift guards clean; refuse registrations after the conclave seals - #26

Merged
Snider merged 2 commits into
mainfrom
fix/ci-drift-guards
Nov 19, 2026
Merged

Snider merged 2 commits into
mainfrom
fix/ci-drift-guards

Conversation

@Snider

@Snider Snider commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

CI on main has been red on the drift guards. They run after the tests, so a red run hid whether the tests passed. This PR makes all three guards pass.

Bug found on the way (separate commit): c.Command, Data.New, Data.MountDir and Drive.New discarded Registry.Set's result. Once WithServiceLock sealed the conclave, they returned OK while registering nothing. They now return the refusal. Action, Task and API.RegisterProtocol drop the same result, but they have no Result to carry it in, so fixing them changes their signatures. That's left for a follow-up.

AX-7 naming (29 → 0 gaps, 833 symbols):

  • 13 symbols were tested under short names. Their 39 tests are renamed to Test<File>_<Type>_<Method>_<Variant>.
  • 16 symbols had no tests, and now have their triplets.
  • pool_test.go is rewritten. Its "drops reference" test now checks the backing slot; before, it passed whether or not Get leaked the value.

Test imports (19 → 0 files):

  • Test files use core helpers instead of stdlib.
  • New type aliases where core had nothing: PB, MapFS, MapFile (in test.go, the testing SPOR owner) and LineScanner.
  • Three things genuinely need internal code, so they live in *_internal_test.go and are exported to core_test:
    • the stdout swap for BenchmarkPrintln
    • the go:embed fixture
    • the unsafe pointer helpers

Checked:

  • go test -race, go vet, gofmt and one pass of every benchmark are clean.
  • agent, cli and go-process pass against this branch through a scratch go.work, apart from agent's 6 QA/dispatch tests. Those fail identically under any go.work, because GOWORK leaks into the repos they spawn.

🤖 Generated with Claude Code
Co-Authored-By: Virgil virgil@lethean.io

Snider and others added 2 commits November 19, 2026 12:53
c.Command, Data.New, Data.MountDir and Drive.New discarded the Registry.Set
result, so once WithServiceLock sealed the conclave at startup they returned
OK while registering nothing. They now return the refusal. Found writing the
sealConclave triplet: a command registered after the seal reported success.

Action, Task and API.RegisterProtocol drop the same result but return no
Result to carry it; fixing those changes their signatures, so it's separate.

Co-Authored-By: Virgil <virgil@lethean.io>
The naming guard listed 29 symbols without Test*_{Good,Bad,Ugly} and the
test-imports guard 19 files importing stdlib; both now pass (833 symbols,
211 files), so CI's red means something again.

- 13 symbols were tested under short names (TestConfig_FromEnv_Good):
  renamed to the house Test<File>_<Type>_<Method>_<Variant> form, 39 tests.
- 16 had no tests: Config featureFlags/key/lock/mergeMap, sealConclave,
  Policy.match, Pool Get/Put/Len, evalDeepestSymlinks, executableCandidates,
  hasListedExt, splitPathExt, newCore, readAllSized, registerBuiltins.
  pool_test.go is rewritten in house style; its "drops reference" test now
  checks the backing slot (before, it passed whether or not Get leaked).
- Test files use core helpers instead of stdlib. New aliases for what core
  lacked: PB, MapFS, MapFile (test.go, the testing SPOR owner) and
  LineScanner (what NewLineScanner returns).
- Three things only internal code can do stay in *_internal_test.go:
  BenchmarkPrintln swaps os.Stdout; BenchEmbedFS needs go:embed;
  SliceDataPtr/PinSinkPtr need unsafe. Exported test vars reach core_test.

go test -race, go vet, gofmt and one pass of every benchmark are clean.

Co-Authored-By: Virgil <virgil@lethean.io>
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Snider
Snider merged commit 70ee02f into main Nov 19, 2026
1 of 2 checks passed
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant