fix(ax): restore structured startup logging and contract comments

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-03-30 14:16:38 +00:00
parent a2ff1ce19a
commit 44bfe6224e
3 changed files with 18 additions and 1 deletions

View file

@ -16,7 +16,7 @@ import (
func main() {
if err := runCoreAgent(); err != nil {
core.Error(err.Error())
core.Error("core-agent failed", "err", err)
syscall.Exit(1)
}
}

View file

@ -434,6 +434,7 @@ func (s *PrepSubsystem) gitCmd(ctx context.Context, dir string, args ...string)
## Changelog
- 2026-03-30: main now logs startup failures with structured context, and the workspace contract reference restored usage-example comments for the Action lifecycle messages.
- 2026-03-29: cmd/core-agent no longer rewrites `os.Args` before startup. The binary-owned commands now use named handlers, keeping the entrypoint on Core CLI primitives instead of repo-local argument mutation.
- 2026-03-29: brain/provider.go no longer imports net/http for Gin handlers. Handler responses now use named status constants and shared response helpers. HTTP remains intentionally centralised in pkg/agentic/transport.go.
- 2026-03-26: WIP — net/http consolidated to transport.go (ONE file). net/url + io/fs eliminated. RFC-025 updated with 3 new quality gates (net/http, net/url, io/fs). 1:1 test + example test coverage. Array[T].Deduplicate replaces custom helpers.

View file

@ -39,15 +39,28 @@ type Stoppable interface {
// --- Action Messages ---
// ActionServiceStartup marks the broadcast that fires before services start.
//
// c.ACTION(core.ActionServiceStartup{})
type ActionServiceStartup struct{}
// ActionServiceShutdown marks the broadcast that fires before services stop.
//
// c.ACTION(core.ActionServiceShutdown{})
type ActionServiceShutdown struct{}
// ActionTaskStarted marks the broadcast that a named task has started.
//
// c.ACTION(core.ActionTaskStarted{TaskIdentifier: "task-42", Action: "agentic.dispatch"})
type ActionTaskStarted struct {
TaskIdentifier string
Action string
Options Options
}
// ActionTaskProgress marks the broadcast that a named task has reported progress.
//
// c.ACTION(core.ActionTaskProgress{TaskIdentifier: "task-42", Action: "agentic.dispatch", Progress: 0.5})
type ActionTaskProgress struct {
TaskIdentifier string
Action string
@ -55,6 +68,9 @@ type ActionTaskProgress struct {
Message string
}
// ActionTaskCompleted marks the broadcast that a named task has completed.
//
// c.ACTION(core.ActionTaskCompleted{TaskIdentifier: "task-42", Action: "agentic.dispatch"})
type ActionTaskCompleted struct {
TaskIdentifier string
Action string