Plans 1-5 complete for core/go scope. 456 tests, 84.4% coverage, 100% AX-7 naming.
Critical bugs (Plan 1):
- P4-3+P7-3: ACTION broadcast calls all handlers with panic recovery
- P7-2+P7-4: RunE() with defer ServiceShutdown, Run() delegates
- P3-1: Startable/Stoppable return Result (breaking, clean)
- P9-1: Zero os/exec — App.Find() rewritten with os.Stat+PATH
- I3: Embed() removed, I15: New() comment fixed
- I9: CommandLifecycle removed → Command.Managed field
Registry[T] (Plan 2):
- Universal thread-safe named collection with 3 lock modes
- All 5 registries migrated: services, commands, drive, data, lock
- Insertion order preserved (fixes P4-1)
- c.RegistryOf("name") cross-cutting accessor
Action/Task system (Plan 3):
- Action type with Run()/Exists(), ActionHandler signature
- c.Action("name") dual-purpose accessor (register/invoke)
- TaskDef with Steps — sequential chain, async dispatch, previous-input piping
- Panic recovery on all Action execution
- broadcast() internal, ACTION() sugar
Process primitive (Plan 4):
- c.Process() returns Action sugar — Run/RunIn/RunWithEnv/Start/Kill/Exists
- No deps added — delegates to c.Action("process.*")
- Permission-by-registration: no handler = no capability
Missing primitives (Plan 5):
- core.ID() — atomic counter + crypto/rand suffix
- ValidateName() / SanitisePath() — reusable validation
- Fs.WriteAtomic() — write-to-temp-then-rename
- Fs.NewUnrestricted() / Fs.Root() — legitimate sandbox bypass
- AX-7: 456/456 tests renamed to TestFile_Function_{Good,Bad,Ugly}
Co-Authored-By: Virgil <virgil@lethean.io>
1.5 KiB
1.5 KiB
RFC Plan 2 — Registry + Actions Sessions (COMPLETED 2026-03-25)
All core/go items shipped. core/agent migration and go-process v0.7.0 are separate repo scope.
Session Goal: Registry[T] + First Migration
- Build
registry.gowith full AX-7 tests - Migrate
serviceRegistry→ServiceRegistryembeddingRegistry[*Service] - Verify all existing tests still pass
- Commit + push
Session Goal: Action System
- Rename
task.go→action.go - Move
RegisterAction/RegisterActions/RegisterTasktoipc.go - Build
ActionDeftype withRun(),Exists(),Def() - Wire
c.Action("name")dual-purpose accessor - Full AX-7 tests
- Commit + push
Session Goal: Migrate core/agent Handlers
- Register named Actions in
agentic.Register() - Replace nested
c.ACTION()cascade with Task pipeline - Test that queue drains properly after agent completion
- This is the P6-1 fix — the queue starvation bug
Session Goal: c.Process() + go-process v0.7.0
- Update go-process factory to return
core.Result - Add
process.Registerdirect factory - Remove
agentic.ProcessRegisterbridge - Add
Processprimitive to core/go (sugar over Actions) - Migrate core/agent
proc.go→s.core.Process()calls - Delete
proc.goandensureProcess()
Between Sessions
Each session should produce:
- Working code (all tests pass)
- A commit with conventional message
- Updated coverage numbers
- Any new findings added to RFC.md passes