fix(ax): remove leftover narrative comments

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-03-31 05:49:11 +00:00
parent f0c903d8c3
commit aee6452688
8 changed files with 3 additions and 18 deletions

View file

@ -1,7 +1,7 @@
// SPDX-License-Identifier: EUPL-1.2
// c.Action("agentic.dispatch").Run(ctx, options)
// c.Actions() // all registered capabilities
// c.Actions()
package agentic

View file

@ -62,7 +62,6 @@ func (s *PrepSubsystem) createEpic(ctx context.Context, callRequest *mcp.CallToo
input.Template = "coding"
}
// Ensure "agentic" label exists
labels := input.Labels
hasAgentic := false
for _, l := range labels {
@ -75,20 +74,17 @@ func (s *PrepSubsystem) createEpic(ctx context.Context, callRequest *mcp.CallToo
labels = append(labels, "agentic")
}
// Get label IDs
labelIDs := s.resolveLabelIDs(ctx, input.Org, input.Repo, labels)
// Step 1: Create child issues first (we need their numbers for the checklist)
var children []ChildRef
for _, task := range input.Tasks {
child, err := s.createIssue(ctx, input.Org, input.Repo, task, "", labelIDs)
if err != nil {
continue // Skip failed children, create what we can
continue
}
children = append(children, child)
}
// Step 2: Build epic body with checklist
body := core.NewBuilder()
if input.Body != "" {
body.WriteString(input.Body)
@ -99,7 +95,6 @@ func (s *PrepSubsystem) createEpic(ctx context.Context, callRequest *mcp.CallToo
body.WriteString(core.Sprintf("- [ ] #%d %s\n", child.Number, child.Title))
}
// Step 3: Create epic issue
epicLabels := append(labelIDs, s.resolveLabelIDs(ctx, input.Org, input.Repo, []string{"epic"})...)
epic, err := s.createIssue(ctx, input.Org, input.Repo, input.Title, body.String(), epicLabels)
if err != nil {
@ -113,7 +108,6 @@ func (s *PrepSubsystem) createEpic(ctx context.Context, callRequest *mcp.CallToo
Children: children,
}
// Step 4: Optionally dispatch agents to each child
if input.Dispatch {
for _, child := range children {
_, _, err := s.dispatch(ctx, callRequest, DispatchInput{
@ -171,7 +165,6 @@ func (s *PrepSubsystem) resolveLabelIDs(ctx context.Context, org, repo string, n
return nil
}
// Fetch existing labels
url := core.Sprintf("%s/api/v1/repos/%s/%s/labels?limit=50", s.forgeURL, org, repo)
httpResult := HTTPGet(ctx, url, s.forgeToken, "token")
if !httpResult.OK {
@ -194,7 +187,6 @@ func (s *PrepSubsystem) resolveLabelIDs(ctx context.Context, org, repo string, n
if id, ok := nameToID[name]; ok {
ids = append(ids, id)
} else {
// Create the label
id := s.createLabel(ctx, org, repo, name)
if id > 0 {
ids = append(ids, id)

View file

@ -8,7 +8,7 @@ import (
)
// alive := agentic.ProcessAlive(c, proc.ID, proc.Info().PID)
// alive := agentic.ProcessAlive(c, "", 12345) // legacy PID fallback
// alive := agentic.ProcessAlive(c, "", 12345)
func ProcessAlive(c *core.Core, processID string, pid int) bool {
service, ok := lookupProcessService(c)
if !ok {

View file

@ -228,7 +228,6 @@ func (s *PrepSubsystem) runPHPTests(repoDir string) verifyResult {
process := s.Core().Process()
composerResult := process.RunIn(ctx, repoDir, "composer", "test", "--no-interaction")
if !composerResult.OK {
// Try pest as fallback
fallbackResult := process.RunIn(ctx, repoDir, "./vendor/bin/pest", "--no-interaction")
if !fallbackResult.OK {
return verifyResult{passed: false, testCmd: "none", output: "No PHP test runner found (composer test and vendor/bin/pest both unavailable)", exitCode: 1}

View file

@ -79,7 +79,6 @@ func (s *PrepSubsystem) watch(ctx context.Context, request *mcp.CallToolRequest,
progressCount := float64(0)
total := float64(len(workspaceNames))
// MCP tests and internal callers may not provide a full request envelope.
progressToken := any(nil)
if request != nil && request.Params != nil {
progressToken = request.Params.GetProgressToken()

View file

@ -73,7 +73,6 @@ func (s *DirectSubsystem) RegisterTools(server *mcp.Server) {
Description: "Remove a memory from OpenBrain by ID.",
}, s.forget)
// Agent messaging — direct, chronological, not semantic
s.RegisterMessagingTools(server)
}
@ -152,7 +151,6 @@ func (s *DirectSubsystem) recall(ctx context.Context, _ *mcp.CallToolRequest, in
"query": input.Query,
"top_k": input.TopK,
}
// Only filter by agent_id if explicitly provided — shared brain by default
if input.Filter.AgentID != "" {
body["agent_id"] = input.Filter.AgentID
}

View file

@ -274,7 +274,6 @@ func (s *Service) actionDispatch(_ context.Context, options core.Options) core.R
return core.Result{Value: core.E("runner.actionDispatch", core.Concat("queue at capacity: ", reason), nil), OK: false}
}
// Reserve the slot immediately — before returning to agentic.
workspaceName := core.Concat("pending/", repo)
s.workspaces.Set(workspaceName, &WorkspaceStatus{
Status: "running",

View file

@ -193,13 +193,11 @@ func parseGitRemote(remote string) string {
return ""
}
// HTTPS/HTTP URL — extract path after host
if core.Contains(remote, "://") {
schemeParts := core.SplitN(remote, "://", 2)
if len(schemeParts) == 2 {
rest := schemeParts[1]
if pathSegments := core.Split(rest, "/"); len(pathSegments) > 1 {
// Skip host, take path
pathStart := len(pathSegments[0]) + 1
if pathStart < len(rest) {
return trimRemotePath(rest[pathStart:])