RFC.plan.md: master context document for future sessions - 5 root causes, 3 critical bugs, key decisions, what NOT to do - Session context that won't survive compact - Cross-references to existing RFCs that solve problems RFC.plan.1.md: first session priorities - Fix 3 critical bugs (one-line changes) - AX-7 rename for core/go - Start Registry[T] RFC.plan.2.md: subsequent session goals - Registry + migration - Action system - core/agent cascade fix - c.Process() + go-process v0.7.0 Future sessions: read RFC.plan.md first, then the numbered plan for that session's scope. Co-Authored-By: Virgil <virgil@lethean.io>
2 KiB
2 KiB
RFC Plan 1 — First Session Priorities
Read RFC.plan.md first. This is what to do in the FIRST session after compact.
Priority 1: Fix the 3 Critical Bugs (Plan 1)
These are one-line to five-line changes. Ship as v0.7.1.
Bug 1: ACTION stops on !OK (ipc.go line ~33)
// CURRENT (broken — handler 3 failing silences handlers 4 and 5):
for _, h := range handlers {
if r := h(c, msg); !r.OK { return r }
}
// FIX:
for _, h := range handlers {
func() {
defer func() { if r := recover(); r != nil { Error("handler panic", "err", r) } }()
h(c, msg)
}()
}
This also fixes P7-3 (no panic recovery) in the same change.
Bug 2: Run() leaks on startup failure (core.go Run method)
Add one line:
func (c *Core) Run() {
defer c.ServiceShutdown(context.Background()) // ADD THIS
// ... rest unchanged
}
Bug 3: Remove stale Embed() and fix comment
Delete func (c *Core) Embed() Result from core.go.
Fix the New() comment to show *Core return.
Test all 3 with AX-7 naming:
TestIpc_Action_Ugly_HandlerFailsChainContinues
TestIpc_Action_Ugly_HandlerPanicsChainContinues
TestCore_Run_Ugly_StartupFailureCallsShutdown
Priority 2: AX-7 Rename for core/go
Run the same Python rename script used on core/agent:
# Same script from core/agent session — applies to any Go package
# Changes TestFoo_Good to TestFile_Foo_Good
This is mechanical. No logic changes. Just naming.
Then run gap analysis:
python3 -c "... same gap analysis script ..."
Priority 3: Start Registry[T] (Plan 2)
Create registry.go with the type. Write tests FIRST (AX-7 complete from day one):
TestRegistry_Set_Good
TestRegistry_Set_Bad
TestRegistry_Set_Ugly
TestRegistry_Get_Good
...
Then migrate serviceRegistry first (most tested, most used).
What To Skip In First Session
- Plan 3 (Actions) — needs Registry first
- Plan 4 (Process) — needs Actions first
- Plan 6 (ecosystem sweep) — needs everything first
- Any breaking changes — v0.7.1 is additive only