Skip to content

chore: promote dev to main — agent v0.28.0 (Mantis #1216, audit COMPLIANT)#10

Merged
Snider merged 1 commit intomainfrom
dev
Apr 30, 2026
Merged

chore: promote dev to main — agent v0.28.0 (Mantis #1216, audit COMPLIANT)#10
Snider merged 1 commit intomainfrom
dev

Conversation

@Snider
Copy link
Copy Markdown
Contributor

@Snider Snider commented Apr 30, 2026

Closes Mantis #1216.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved error handling and validation across HTTP operations, configuration parsing, and action execution.
    • Enhanced failure detection for stream operations and workspace cleanup tasks.
    • Fixed missing result validation in repository synchronisation and PR workflows.
  • New Features

    • Added structured result-based variants for YAML unmarshalling and stream operations.
  • Tests

    • Introduced comprehensive unit and example tests for agent compatibility, Forge API, and provider routing.

audit.sh verdict: COMPLIANT (every counter at 0).

Closes tasks.lthn.sh/view.php?id=1216

Co-authored-by: Codex <noreply@openai.com>
@Snider Snider merged commit 5363360 into main Apr 30, 2026
1 of 2 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e5450642-5a96-4815-8547-7ea45940799e

📥 Commits

Reviewing files that changed from the base of the PR and between 39a2d41 and d40e919.

⛔ Files ignored due to path filters (1)
  • go.work is excluded by !**/*.work
📒 Files selected for processing (39)
  • go/cmd/core-agent/commands.go
  • go/cmd/core-agent/main.go
  • go/pkg/agentcompat/agentcompat.go
  • go/pkg/agentcompat/agentcompat_example_test.go
  • go/pkg/agentcompat/agentcompat_test.go
  • go/pkg/agentic/actions.go
  • go/pkg/agentic/auto_pr.go
  • go/pkg/agentic/branch_cleanup.go
  • go/pkg/agentic/commands_forge.go
  • go/pkg/agentic/commands_workspace.go
  • go/pkg/agentic/dispatch.go
  • go/pkg/agentic/epic.go
  • go/pkg/agentic/fleet_connect.go
  • go/pkg/agentic/flow.go
  • go/pkg/agentic/forge_client.go
  • go/pkg/agentic/forge_client_example_test.go
  • go/pkg/agentic/forge_client_test.go
  • go/pkg/agentic/handlers.go
  • go/pkg/agentic/mirror.go
  • go/pkg/agentic/pipeline_budget.go
  • go/pkg/agentic/pr.go
  • go/pkg/agentic/prep.go
  • go/pkg/agentic/provider_manager.go
  • go/pkg/agentic/qa_analysis.go
  • go/pkg/agentic/qa_cluster.go
  • go/pkg/agentic/queue.go
  • go/pkg/agentic/review_queue.go
  • go/pkg/agentic/scan.go
  • go/pkg/agentic/training_journal.go
  • go/pkg/brain/actions.go
  • go/pkg/brain/brain.go
  • go/pkg/brain/direct.go
  • go/pkg/brain/provider_contract.go
  • go/pkg/brain/provider_contract_example_test.go
  • go/pkg/brain/provider_contract_test.go
  • go/pkg/lib/lib.go
  • go/pkg/monitor/monitor.go
  • go/pkg/runner/queue.go
  • go/pkg/runner/runner.go

📝 Walkthrough

Walkthrough

The pull request introduces a structured error-handling pattern migration using core.Result across multiple packages. It adds Result-based variants for YAML unmarshalling and stream operations in the agentcompat package, converts the Forge HTTP boundary from error-based to Result-based returns, and improves error propagation by validating previously-ignored operation outcomes. New tests and examples are added for validation, whilst comment-only changes demonstrate usage of the new patterns.

Changes

Cohort / File(s) Summary
agentcompat package – Result-based operations
go/pkg/agentcompat/agentcompat.go, go/pkg/agentcompat/agentcompat_test.go, go/pkg/agentcompat/agentcompat_example_test.go
Adds UnmarshalYAMLResult, SendResult, ReceiveResult, and CloseResult methods returning core.Result for ConcurrencyLimit and HTTPStream types, with existing error-based methods becoming adapters that convert Result outcomes to errors. Introduces comprehensive unit tests and example tests validating YAML unmarshalling, HTTP roundtrip handling, error cases (missing fields, nil receivers), and response buffer management.
Forge client migration – HTTP boundary
go/pkg/agentic/forge_client.go, go/pkg/agentic/forge_client_test.go, go/pkg/agentic/forge_client_example_test.go
Migrates HTTP helpers (doJSON, getJSON, postJSON, patchJSON, deletePath) and all downstream API methods to return core.Result instead of error. Adds forgeAPIError formatting validation tests, introduces APIError as a public alias, and adds an unused forgeResultError adapter for contract compatibility.
Agentic handlers – error propagation
go/pkg/agentic/actions.go, go/pkg/agentic/handlers.go, go/pkg/agentic/dispatch.go
Updates QA/Auto-PR/Verify/Commit handlers to return early on ACTION(...) failures instead of discarding results. Converts previously unchecked action notifications (rate-limit, agent lifecycle, completion monitor) to result-checked flows with conditional warning emission. Removes dead-code assignments and adds failure detection for side-effecting operations.
Agentic commands – Result-based validation
go/pkg/agentic/commands_forge.go, go/pkg/agentic/commands_workspace.go, go/pkg/agentic/pr.go, go/pkg/agentic/prep.go, go/pkg/agentic/scan.go
Replaces error-variable handling with explicit result.OK checks and forgeResultError(result) error extraction. Adds validation for filesystem.DeleteAll and deleteBranch outcomes; guards type assertions for milestone/label/repo results; validates git fetch and PR creation result values before consuming them.
Utility functions – error handling tightening
go/pkg/agentic/auto_pr.go, go/pkg/agentic/branch_cleanup.go, go/pkg/agentic/epic.go, go/pkg/agentic/fleet_connect.go, go/pkg/agentic/flow.go, go/pkg/agentic/mirror.go, go/pkg/agentic/qa_analysis.go, go/pkg/agentic/qa_cluster.go, go/pkg/agentic/queue.go, go/pkg/lib/lib.go
Adds validation of previously-ignored return values: writeStatusResult failures, hash.Write errors, type assertion outcomes, syscall.Close errors, and config type-checking. Removes stray comment lines and improves early-return patterns on failures.
Brain package – contract updates and tests
go/pkg/brain/provider_contract.go, go/pkg/brain/provider_contract_test.go, go/pkg/brain/provider_contract_example_test.go
Renames RouteDescription.Path JSON serialisation key from "path" to "route". Introduces unit tests validating zero-value behaviour, field preservation, and optional fields; adds example test demonstrating creation and printing of a route description.
Comment-only and example updates
go/cmd/core-agent/commands.go, go/cmd/core-agent/main.go, go/pkg/agentic/pipeline_budget.go, go/pkg/agentic/provider_manager.go, go/pkg/agentic/review_queue.go, go/pkg/agentic/training_journal.go, go/pkg/brain/actions.go, go/pkg/brain/brain.go, go/pkg/brain/direct.go, go/pkg/monitor/monitor.go, go/pkg/runner/queue.go, go/pkg/runner/runner.go
Updates commented-out example code to assign return values to result or err variables instead of discarding with _. Removes one extraneous dead-code statement in IPC event handling.

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

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