The list_actors(namespace=...) method previously applied the namespace filter *after* releasing threading.RLock, leaving a window where concurrent mutations to _actors (via discover() or clear()) could corrupt the iteration state. The filter now runs inside the locked section, matching the locking discipline of all other public methods. Changes: - loader.py: moved namespace filtering inside with self._lock block - Added unit tests for concurrent list_actors + mutate thread safety - Added BDD scenarios in tdd_actors_loader_lock_filter.feature - Updated CHANGELOG.md and CONTRIBUTORS.md ISSUES CLOSED: #8660
43 KiB
Changelog
All notable changes to this project will be documented in this file. The format follows Keep a Changelog.
[Unreleased]
Fixed
- ActorLoader.list_actors namespace filter moved inside lock (#8660): The
list_actors(namespace=...)method previously applied the namespace filter after releasingthreading.RLock, which left a window where concurrent mutations to_actors(viadiscover()orclear()) could corrupt the iteration state. The filter now runs inside the locked section, matching the locking discipline of all other public methods and preventing potentialRuntimeError: dictionary changed size during iterationunder concurrent load.
Documentation
- Spec clarifications: layer boundary DI exception, ULID scope, TUI/ACMS gaps (#10451): Added targeted clarifications to
docs/specification.mdincluding: the sole permitted location (application/container.py) where application layer may reference infrastructure concrete types; distinction between domain entity IDs (must be ULID) and ephemeral internal implementation IDs; per-stage protocol contracts, storage tier definitions, budget enforcement protocol, and output format for ACMS pipeline stages; and public interface definitions with verifiable checks for 8 TUI components.
Changed
agents session listnow displays full 26-character session ULIDs (#10970): The Rich table and Summary panel ("Most Recent" / "Oldest") previously showed only the first 8 characters of each session ULID. This made the output unusable for copy-paste intosession tell,session show,session delete, andsession export, all of which require the full 26-character identifier. The full ULID is now displayed in all output formats (Rich, plain, JSON, YAML, table).
Security
- aiohttp upgraded to >=3.13.4 to remediate CVE-2026-34513 and CVE-2026-34515 (#1549, #1544):
Added an explicit
aiohttp>=3.13.4dependency constraint topyproject.tomlto remediate two high-severity open redirect vulnerabilities. Both CVEs affect the CleverAgents platform's HTTP infrastructure including A2A server communication, tool source fetching (MCP servers, Agent Skills), and agent-to-agent protocol handlers. The version floor ensures vulnerable versions (<3.13.4) cannot be installed even if upstream transitive dependencies have loose version constraints.
Fixed
- Implementation Supervisor PR Compliance Checklist (#9824): Added a mandatory
8-item PR Compliance Checklist to the worker prompt body in
implementation-supervisor.mdthat every implementation worker must complete before creating a PR. Checklist covers: CHANGELOG.md update, CONTRIBUTORS.md update, commit footer (ISSUES CLOSED: #N), CI verification, BDD tests, Epic reference, label application viaforgejo-label-manager, and milestone assignment. This eliminates systemic PR merge blockers caused by workers omitting required items.
Changed
-
Restored
benchmark-regressionCI job tomaster.ymlwithpull_requesttrigger guard (if: forgejo.event_name == 'pull_request'). The job was previously absent frommaster.yml, causing benchmark regression testing to never run on PRs. The job is informational only and is not instatus-check's required needs list. (Closes #10716) -
CI coverage job now waits for unit_tests (#10714): Added
unit_teststo theneedslist of thecoveragejob inci.yml. Previously the coverage job ran in parallel with unit tests, which could produce misleading pass results when tests were still in-flight or had already failed. Coverage now only starts after unit tests succeed, eliminating redundant parallel test execution and ensuring coverage results are always meaningful. -
Bandit B608 f-string SQL in plan phases migration (#10777): Replaced f-string SQL construction in
a5_005_rebaseline_plan_phases.pywith plain string concatenation. TheINSERT INTO _v3_plans_new ... SELECT ... FROM v3_plansstatement used f-strings to interpolate_ALL_DATA_COLUMNS, which Bandit flags as B608 (SQL injection risk). The constant is hardcoded and safe, but the f-string pattern blocks tightening the bandit severity gate from HIGH to MEDIUM (issue #9945). Replaced with"INSERT INTO _v3_plans_new (" + _ALL_DATA_COLUMNS + ") " "SELECT " + _ALL_DATA_COLUMNS + " FROM v3_plans". -
Diagnostics spec examples expanded to all 9 providers (#5320): Updated the
agents diagnosticscommand examples in the specification to show all 9 supported providers (OpenAI, Anthropic, Google, Gemini, Azure, OpenRouter, Cohere, Groq, Together), matching the implementation from PR #3469. Rich, plain, JSON, and YAML example outputs now reflect comprehensive provider coverage with accurate warning counts and per-provider recommendations.
Added
-
agents actor context clearcommand to reset actor message history and state while preserving the underlying context directory viaContextManager(#6370). -
Plan checkpoint management CLI commands (#8683): Added
agents plan checkpoint-list <plan-id>andagents plan checkpoint-delete <checkpoint-id>commands. Listing output now highlights checkpoint ID, type, created timestamp, reason, phase, and decision linkage with a concise field summary footer across rich/table/json/yaml formats. Deletion supports batch IDs, interactive confirmation (skip with--yes), and structured JSON/YAML responses for automation-friendly scripting. -
Invariant Remove CLI Command (#8530): Implemented
agents invariant remove <id>command that soft-deletes an invariant by ID. The command displays a confirmation prompt before removal (bypassable with--yes/-y), outputs the removed invariant ID on success, and shows a clear error message when the invariant ID does not exist. Supports--formatflag for JSON and YAML output. Full BDD test coverage and Robot Framework integration tests included. -
TDD: MCPToolAdapter.infer_resource_slots() TypeError with null properties (#10470): Added a TDD issue-capture Behave scenario that reproduces the bug where
MCPToolAdapter.infer_resource_slots()raisesTypeErrorwhen the input schema contains{"properties": None}. The test is tagged@tdd_expected_failand will pass (by inversion) until the underlying bug is fixed. -
Architecture Pool Supervisor Milestone Assignment (#7521): Added a "PR Workflow for Major Changes" section to the
architecture-pool-supervisoragent definition documenting the milestone assignment step for spec PRs. The agent now hasforgejo_update_pull_requestpermission to assign PRs to the current active milestone after creation, improving traceability of specification changes within project milestone planning. Includes BDD test coverage for the new workflow documentation and permission configuration. -
Git Worktree TOCTOU Race Condition (#7507): Fixed a Time-Of-Check-To-Time-Of-Use (TOCTOU) race condition in
git_worktree.pythat could causegit worktree addoperations to fail under concurrent execution. The fix replaces the unsafemkdtemp()+rmdir()pattern with a parent-directory approach that maintains the OS-level uniqueness guarantee throughout the entire operation. The parent temporary directory is now persisted and properly cleaned up on both success and failure paths. Comprehensive BDD test coverage validates the fix under concurrent execution and confirms proper cleanup behavior.
Fixed
-
LLMTraceRepository.save()premature commit breaks UnitOfWork transactions (#7505): Replaced the unconditionalsession.commit()inLLMTraceRepository.save()with a dual-path implementation that respects the UnitOfWork (UoW) pattern. When an external session is provided (UoW mode), the method now calls onlysession.flush(), leaving transaction control to the caller. When no session is provided (standalone mode), the method creates its own session, flushes, commits, and closes it to ensure durable persistence. This eliminates three data-integrity violations: premature commit of outer UoW transactions, loss of rollback capability for subsequent failures, and a mismatch between the class docstring ("Callers are responsible for commit") and the implementation. Input validation for thetraceargument was also added. Two new BDD scenarios verify the session contract:Repository save() calls flush not commitandLLM trace rolled back when UnitOfWork transaction rolls back. -
git_tools._get_base_env() TOCTOU Race Condition (#7619): Fixed a Time-Of-Check-To-Time-Of-Use race condition in
git_tools._get_base_env()where two concurrent threads could both observe_BASE_ENV is None, both snapshotos.environ, and write potentially different snapshots. The fix adds a module-level_BASE_ENV_LOCK: threading.Lockand replaces the bareif _BASE_ENV is Noneassignment with double-checked locking: the outer check keeps the warm-cache path lock-free; the inner check insidewith _BASE_ENV_LOCKprevents duplicate initialisation on the very first concurrent call. Three new BDD scenarios infeatures/git_tools.feature(with step definitions infeatures/steps/git_tools_thread_safety_steps.py) verify caching identity, content correctness, and thread safety under 20 concurrent threads. -
Unified provider factory: eliminate divergence between
create_llm()andcreate_ai_provider()(#10949): Introduced_create_provider_instance()as the single internal factory so that both public methods delegate to one place. Creating a new provider now requires changes in exactly one method.- Fixed API key regression: the unified factory now explicitly passes
the validated API key to all LangChain constructors (OpenAI, Anthropic,
Google / Gemini, Azure, Groq, Together, Cohere, and OpenRouter). Users
who configure providers via
CLEVERAGENTS_-prefixed variables are no longer silently failed when LangChain falls back to raw environment variable lookup. Pre-validated keys are forwarded through theapi_keykwarg to avoid a second settings lookup in the factory closure. (Closes #10949) - Fixed mock provider accessibility in production:
ProviderType.MOCKis now gated by theCLEVERAGENTS_ALLOW_MOCK_PROVIDER=truesentinel environment variable. Without this flag, bothcreate_llm()andcreate_ai_provider()raiseValueErrorwhen MOCK is requested, preventing accidental or malicious use of the fake LLM in production.resolve_provider_by_name("mock")now also respects the guard andis_provider_configured(ProviderType.MOCK)returnsTrueas expected. - Fixed type annotation:
create_llm()now declares**kwargs: Anyinstead of**kwargs: object, restoring correct Pyright inference for forwarded keyword arguments.
- Fixed API key regression: the unified factory now explicitly passes
the validated API key to all LangChain constructors (OpenAI, Anthropic,
Google / Gemini, Azure, Groq, Together, Cohere, and OpenRouter). Users
who configure providers via
-
create_llm()raisesUnsupported provider type: openrouter(#10948): FixedProviderRegistry._create_provider_llm()missing anOPENROUTERbranch, which causedagents actor run openrouter/<model>to fail withValueError. Added aProviderType.OPENROUTERbranch that creates aChatOpenAIinstance configured withopenai_api_base="https://openrouter.ai/api/v1"and the OpenRouter API key, matching the behavior ofcreate_ai_provider("openrouter"). Supports optionaldefault_headerskwarg with automatic string coercion for non-string keys/values. -
LoadingThrobber Widget Restored (#6357): Restored
LoadingThrobberwidget -
Built-in actors v3 YAML format (#10883): Fixed
agents actor runfailing for built-in actors (e.g.,openai/gpt-4,anthropic/claude-3-opus) due to missing v3typefield in stored configuration.ActorRegistry.ensure_built_in_actors()now generates and persists v3 YAML text withtype: llmanddescriptionfields, ensuring built-in actors work identically to custom actors. The_generate_builtin_actor_yaml()helper creates spec-compliant YAML that passesReactiveConfigParser._is_v3_format()validation. Includes BDD scenarios and unit tests covering YAML generation, schema validation, and multiple provider handling. -
Atomic
server_connectconfig writes (#993): Fixedserver_connectincli/commands/server.pyto write all three config values (server.url,server.namespace,server.tls-verify) atomically. A snapshot of the config file is taken before any writes; if anyset_value()call fails, the snapshot is restored and compensatingCONFIG_CHANGEDevents are emitted for already-applied keys so the audit trail reflects the rollback. Addedemit_config_changed()helper toConfigServicefor decoupled event emission in rollback flows. Addedclose()method toReactiveEventBusfor proper resource cleanup in tests. Resolved merge conflict inconfig_service.pyintegrating the PR'semit_config_changed()helper with master's scoped config infrastructure. Removed# type: ignore[assignment]by introducing a typed_AutoDiscoversentinel class. BDD regression coverage infeatures/tdd_server_connect_atomic_writes.feature. -
Atomic
load_from_metadatafor Autonomy Guardrails (#7504): FixedAutonomyGuardrailService.load_from_metadata()to validate bothAutonomyGuardrailsandGuardrailAuditTrailmodels before writing either to state, ensuring atomic updates. Previously, a validation failure on the audit trail after guardrails were already written would leave the system in an inconsistent state with partial updates. The method now uses a two-phase validate-then-write approach: all model validation occurs in Phase 1, and state mutations only happen in Phase 2 after all validations succeed. -
agents actor runempty response for built-in LLM actors (#10861): Fixedresolve_config_filesincli/commands/_resolve_actor.pysilently returning empty output when invoked with a built-in actor name (e.g.anthropic/claude-sonnet-4-20250514). Built-in actors generated from the provider registry have aconfig_blobwithproviderandmodelfields but notypefield. Serialising this blob as-is produced YAML thatReactiveConfigParsercould not interpret (no agents, no routes → emptyReactiveConfig→ empty response). Fix:_synthesize_llm_yaml()now synthesises a minimal v3type: llmYAML when the actor has noyaml_textand theconfig_blobhasproviderandmodelbut notypefield, allowing the reactive config parser to create a working agent and graph route. BDD regression coverage infeatures/tdd_actor_run_response.feature. -
ReactiveConfigParser route synthesis for v3 actors (#10807): Fixed
agents actor runsilently returning empty output for v3type:llmactors._build_from_v3()and_build()now synthesise a default single-node graph route when agents are created without explicit routes, ensuringrun_single_shot()can invoke the LLM viaGraphExecutor. The nestedactors:map format also translates the v3actor: "provider/model"key into separateproviderandmodelkeys so the correct LLM provider is instantiated. -
ActorRegistry.add() spec-compliant YAML support (#4466): The registry now accepts actor YAML using the spec's
actors:map format with nestedconfig:blocks, in addition to the legacy top-levelprovider/modelformat. Theunsafeflag and graph descriptor from nested config are now correctly preserved during registration. Multi-actor YAML (>1 entry inactors:/agents:map) is now rejected byadd()with aValidationError. Nestedconfig.optionsare now correctly preserved. Theunsafecoercion now uses strictis True or == 1instead ofbool()to prevent truthy non-boolean YAML values (e.g.unsafe: "no") from being treated as unsafe. -
UKO Runtime Layer 2 (Paradigm) Indexing (#9351): Added missing
rdf:type uko-oo:Classtriple emission inPythonAnalyzer._extract_class()so that Python class definitions are now correctly classified at layer 2 (paradigm/OO) in addition to layer 3 (technology). Added the corresponding Behave scenarioIndexing a Python file populates layer 2 (paradigm)tofeatures/uko_runtime.feature, completing four-layer guarantee verification for the UKO runtime. -
Actor CLI v3 YAML Schema Support (#6283): Fixed three components to add full v3
ActorConfigSchemasupport to the actor CLI registration and execution paths.ActorConfiguration.from_blob()now detects v3 format (top-leveltypekey ofllm/graph/tool) and correctly extracts provider, model, and graph descriptors — includingtype: toolactors without amodelfield.ActorRegistry.add()validates against the full Pydantic v2 schema, persistsskills/lsp/descriptionin the config blob, and compiles graph actors with proper metadata.ReactiveConfigParser._build_from_v3()now uses correctsource/targetedge keys (fixingKeyErrorinto_graph_config()), handlesconfig: nullnodes without crashing, propagatescontext_view/memory/context/env_vars/response_format/lsp_capabilities/lsp_context_enrichmentinto agent configs, and validatesentry_nodeagainst the nodes map. Exception handling narrowed from broadexcept Exceptionto specificNotFoundErrorandActorCompilationError. v3 registration logic extracted tov3_registry.pyto keepregistry.pyunder the 500-line limit. 19 BDD scenarios cover all v3 paths including tool actors, update mode, LSP dict bindings, and field propagation. -
TDD Non-AssertionError Guard Visibility (#8294):
apply_tdd_inversioninfeatures/environment.pynow emits its non-assertion exception guard warning to both the structured logger andstderrvia a new_warning_with_stderrhelper. This makes the guard firing visible in standard Behave console output and CI log snippets where the structured logging sink may not be displayed. BDD infrastructure coverage added: a new scenario intdd_expected_fail_infrastructure.featureasserts that the warning is emitted to stderr when a non-AssertionError exception is encountered in an@tdd_expected_failscenario, and a second scenario asserts the warning is NOT emitted when the exception is anAssertionError. TheCONTRIBUTING.mdnow documents that@tdd_expected_failstep definitions must signal expected failures viaAssertionError. -
Parallel Behave Runner Log Noise Reduction (#8351): The parallel behave runner now suppresses captured stdout/stderr for passing worker chunks and only replays diagnostics for failed, errored, or crashed chunks. This makes failure output significantly easier to spot in CI and local runs. A worker crash (unhandled exception) is detected via an all-zero summary and the captured traceback is always surfaced.
-
Bug Hunt Pool Supervisor Non-Blocking Tracking: Updated
bug-hunt-pool-supervisorto make the automation tracking step non-blocking. Theautomation-tracking-managercall in step 5 is now best-effort — if it does not complete within a reasonable time or fails, the supervisor skips it and continues to the next cycle. Added explicit rule 9 clarifying that tracking must never block the main loop. Core functionality (module scanning and worker dispatch) takes priority over status reporting. -
Name Validator Server-Qualified Format (#9074): Updated actor, skill, and tool name validators to accept the spec-required
[[server:]namespace/]nameformat. Previously, server-qualified names likedev:freemo/custom-analysiswere incorrectly rejected. Added BDD scenarios for server-qualified name acceptance and rejection. All three validators (ActorConfigSchema.validate_name,NAMESPACED_NAME_RE,_TOOL_NAME_PATTERN) now correctly support optional server prefixes while maintaining backward compatibility with existingnamespace/namenames. -
Legacy CLI command removal (#4181): Removed all legacy plan lifecycle CLI commands (
tell,build,new,current,cd,continue) and their associated tests to support V3 Plan Lifecycle exclusively. RemovedtellandbuildCLI shortcuts frommain.pythat delegated to the deprecated commands. Removed orphaned_tell_streamingdead code fromplan.py. Updated help text and command validation to recognize only V3 commands. Added--formatoption toagents session tellfor consistency with other session commands. Fixed MCP logger thread-safety insession.pyusing a threading lock. Created migration guide for users transitioning from legacy to V3 workflow. -
Automation Profile Silent Fallback (#8232):
_resolve_profile_for_planinPlanLifecycleServicenow raises a clearValidationErrorwhen a plan's automation profile name is not a known built-in profile, instead of silently falling back to"manual". Users who configured custom automation profiles (e.g."semi-auto","acme/strict") will now receive an actionable error message listing available built-in profiles. The resolved profile name is also logged at debug level for observability.
Added
-
ACMS Index Data Model and File Traversal Engine (#9579): Implements the foundational ACMS index data model with structured fields for file metadata (path, size, last modified, type), tag system, and hot/warm/cold/archive storage tier assignment. Introduces a timeout-safe large-project file traversal engine capable of handling 10,000+ files without memory exhaustion through chunked processing. Provides a complete index entry pipeline for creation, storage, and retrieval with full queryability by path, tag, type, and recency.
-
ACMS Large-Project Indexing BDD Coverage (#8726): Added 7 Behave scenarios covering walk-based indexing of 10,000+ files without timeout, binary-file skipping, oversized-file skipping, git-checkout indexing, fallback to walk when
git ls-filesis unavailable on a non-git directory, and total-bytes budget enforcement. Optimised fixture setup to pre-create subdirectories (99x fewer syscalls). Addedtimeout=120to git subprocess calls to prevent CI hangs. Cachedget_scoped_viewresults inWhensteps to avoid redundant re-queries inThensteps. -
Agent Evolution Pool Supervisor PR Metadata Assignment (#7888): The agent-evolution-pool-supervisor now automatically looks up the Type/Automation label and the earliest open milestone from the repository before dispatching improvement PR creation workers. Label and milestone IDs are passed to workers via the dispatch context, ensuring all generated improvement PRs have correct Type labels and milestone assignments. Graceful error handling skips label or milestone assignment when either is unavailable. Added comprehensive BDD test suite (7 scenarios) covering label lookup, milestone lookup, worker dispatch, PR creation with metadata, and error handling for missing labels/milestones.
-
Wired
StrategyActorinto the real plan execution path:_get_plan_executorinplan.pynow resolves the strategy actor viaresolve_strategy_actor()(reading theactor.default.strategyconfig key) instead of always constructingLLMStrategizeActor.run_strategizeinPlanExecutornow passesresources(derived fromplan.project_links) andproject_contextto the actor so the LLM prompt receives full project context. Strategy decisions are serialised as JSON inplan.error_details["strategy_decisions_json"]so_build_decisionscan reconstruct the full hierarchy (dependency ordering, parent/child structure) during Execute instead of rebuilding fromdefinition_of_done.StrategizeStubActor.executeaccepts**kwargsfor forward-compatibility. Added BDD coverage for the stored-JSON path, corrupt-JSON fallback, resource-passing, and stub extra-kwargs scenarios. (#828) -
TDD Issue-Capture Test Activation (#7025): Replaced 234 bare
@skiptags across 82 Behave feature files with the correct@tdd_expected_fail @tdd_issue @tdd_issue_<N>tag system. Scenarios whose referenced bugs were already fixed had@tdd_expected_failremoved and now run as permanent regression guards. Net result: 629 features active in CI (up from ~545), zero@skiptags remain. -
Git Worktree Sandbox Apply (#4454): The
plan applycommand now merges LLM-generated changes viagit mergefrom an isolated worktree branch instead of flatshutil.copy2. Displays spec-aligned Apply Summary (plan ID, artifacts, insertions/deletions, project, timestamp), Sandbox Cleanup panel, and✓ OK Changes appliedfooter. Non-git projects fall back to the original flat file copy. -
Context Hydration Fix (#4454): Fixed
ContextFragmentmetadata types (detail_depthandrelevance_scoremust be strings, not int/float) that caused Pydantic validation errors during context assembly, resulting in the LLM receiving zero file context. -
Automation Tracking System: Replaced shared session state issue tracking with individual per-agent tracking issues. Each agent now creates its own
[AUTO-<PREFIX>]titled issues with standardized headers, reporting intervals, and health indicators. Agents:session-persister,implementation-orchestrator,system-watchdog,backlog-groomer,human-liaison. Documentation atdocs/development/automation-tracking.md. -
Automated Health Monitoring and Recovery: The
system-watchdognow runsaudit_automation_tracking_health()every 5 minutes, detecting stalled agents when tracking issues are >20% overdue from their declared reporting interval. On detection, it terminates stalled sessions via the OpenCode Server API, performs root-cause analysis, creates high-priority diagnostic issues, and closes stale tracking issues with recovery notes. -
Centralized Label Management (
forgejo-label-manager): A new specialized subagent centralizes all Forgejo label operations across the agent system. Enforces the organization-level label system, prohibits label creation, and validates label compliance. Agentsbacklog-groomer,human-liaison,project-owner,epic-planner,new-issue-creator, andissue-state-updaternow delegate all label operations to this subagent. -
PR-Issue Label Synchronization: PRs now inherit
Priority/,MoSCoW/,Points/, andState/labels from their associated issues at creation time (pr-api-creator). Thebacklog-groomeradds a continuous Pass 19 for ongoing PR-issue label synchronization. Theissue-state-updatersyncs PR state labels whenever issue states change. -
Automation Tracking Announcements: Extended
automation-tracking-managerwith announcement issue support (CREATE_ANNOUNCEMENT_ISSUE,CLOSE_ANNOUNCEMENT_ISSUE,LIST_TRACKING_ISSUES,READ_ANNOUNCEMENTS,REVIEW_OWN_ANNOUNCEMENTS). Supervisors and workers now read critical announcements before each cycle for cross-agent awareness. Priority-based filtering (Critical/High/Medium/Low) reduces noise. Backlog-groomer performs intelligent cleanup with age thresholds by priority. -
PR Agent Reorganization: All PR-related agents renamed and reorganized to follow the
*-pool-supervisornaming pattern. New agents added:pr-editor(safe PR editing with description preservation),pr-manager(unified PR interface), andpr-merge-pool-supervisor(automated PR merging supervisor). Renamed:pr-api-creatortopr-creator,pr-checkertopr-ci-test-fixer,pr-status-checkertopr-status-analyzer,pr-self-reviewertopr-reviewer,pr-fix-orchestratortopr-fix-pool-supervisor. -
Automated PR Merging (
pr-merge-pool-supervisor): New supervisor continuously monitors for merge-ready PRs and merges them automatically when all criteria are met (approvals, CI passing, no conflicts). Supports both formal reviews and comment-based approvals (LGTM, ready to merge, etc.). -
Implementation Worker Workflow Completion:
implementation-workernow implements work claiming protocols with conflict detection, comprehensive review feedback handling with intelligent parsing, sophisticated merge conflict resolution with multiple strategies, and parallel subtask execution with wave-based dependency analysis. Pass rate improved from 48.15% to 84.8%. -
Container Resource Stop Support:
agents resource stopnow correctly stopscontainer-instanceanddevcontainer-instanceresource types. -
Centralized Automation Tracking Manager (
automation-tracking-manager): The subagent is now the single interface for all tracking issue operations (CREATE_TRACKING_ISSUE,UPDATE_TRACKING_ISSUE,CLOSE_TRACKING_ISSUE,READ_TRACKING_STATE,GET_NEXT_CYCLE_NUMBER). Agents delegate to the manager rather than calling the Forgejo API directly, ensuring sequential cycle numbers across restarts, preventing duplicate issues, and enforcing consistent label application. Migrated agents includesystem-watchdog,implementation-orchestrator,timeline-updater,project-owner,product-builder,backlog-groomer,implementation-pool-supervisor,timeline-update-pool-supervisor, andproject-owner-pool-supervisor. The legacyshared/automation_tracking.mdmodule was removed. -
Documentation Writer Tracking (
docs-writer): The documentation writer now participates in the automation tracking system by creating individual[AUTO-DOCS] Documentation Report (Cycle N)issues every 10 cycles (~3.3 hours). The manager applies the mandatoryAutomation Trackinglabel automatically, while teams may add additional workflow labels as needed. Seedocs/development/automation-tracking.mdand the newdocs/development/docs-writer.mdreference. -
ACMS / UKO API Documentation (
docs/api/acms.md): Added comprehensive API reference for thecleveragents.acmspackage covering the four-layer UKO ontology hierarchy,VocabularyRegistry,ProvenanceInfo,UKOClass,UKOProperty,UKOVocabulary,Layer2Dependency,ParadigmVocabulary,DetailLevelMapBuilder, and all Layer 3 language vocabulary types (Python, TypeScript, Rust, Java). The new page is linked from the API Reference index and the MkDocs navigation. -
Comprehensive Worker Tracking System: All 16 supervisors now provide detailed visibility into worker activities and health via the OpenCode API. Enhanced
product-builder,implementation-orchestrator,continuous-pr-reviewer, anduat-testerwith detailed session monitoring, real cycle-time calculations, stale worker detection and restart, and proper tracking issue lifecycle management (delete previous, create new each cycle). Tracking now extends to previously uncovered supervisors such asarchitect,timeline-updater,docs-writer, andarchitecture-guard. -
Plan Action Argument Upsert:
PlanLifecycleServicenow upserts action arguments duringplan useto avoidUNIQUEconstraint violations when reusing actions. Includes batch-delete updates with identity-map eviction, invariants unique constraint, and an Alembic migration. (#4174)
Changed
-
product-builderWorker Allocation Tier Comments (#8169): Clarified theN_FULLtier comment to explicitly document that PR fixing is handled byimplementation-pool-supervisorvia its PR-First Priority rule. Updated theN_QUARTERcomment to enumerate the pools it covers (UAT, bug hunting, test infra). Prevents confusion about which supervisor handles PR fix work. -
Decision Tree Full ULID Display (#5825): The
agents plan treecommand now displays full 26-character ULIDs for all decisions instead of truncating them to 8 characters. This enables users to copy decision IDs directly from tree output and use them in follow-up CLI commands likeagents plan correctwithout manual ID reconstruction. Added "Decision IDs (for correction)" section with human-readable labels for easy reference. Applies to both table and rich/plain text output formats. -
Automation Tracking Format: All automation tracking issues now use a standardized header format with mandatory
Reporting Interval: <interval> (Next report expected: <ts>)declarations, enabling precise staleness detection. -
PR Review Policy: Reduced PR review requirement from 2 approvals to 1. Self-approval is now permitted including for automated bot PRs. Approval can be a formal review OR an approval comment (LGTM, Approved, ready to merge).
-
Label Delegation Enforcement:
automation-tracking-managernow enforces delegation toforgejo-label-managerfor all label operations, preventing "invalid label ID" errors and ensuring label application uses correct name-to-ID mapping. -
Automation Tracking Label Guidance: Documentation now clarifies that the manager automatically applies the
Automation Trackinglabel and that additional labels such asType/Automation,State/In Progress, orPriority/Mediumremain optional workflow choices rather than mandatory. -
Automation Tracking Agent Prefix Registry: Expanded from 5 agents to 18 agents. New prefixes include
AUTO-DOCS,AUTO-REV-POOL,AUTO-UAT-POOL,AUTO-BUG-POOL,AUTO-INF-POOL,AUTO-ARCH,AUTO-EPIC,AUTO-EVLV,AUTO-GUARD,AUTO-SPEC,AUTO-TIME,AUTO-PROJ-OWN, andAUTO-PROD-BLDR. -
ACMS Context Hydration: Fixed ACMS indexing pipeline not wired into CLI —
ContextTierServicestarted empty on every CLI invocation so LLM received zero file context during plan execution. Addedcontext_tier_hydrator.pythat reads files from linked project resources (viagit ls-filesoros.walk) and stores them asTieredFragmentobjects in the tier service. Hydration runs automatically before context assembly inLLMExecuteActor.execute(). Respects max file size (256KB), total budget (10MB), binary file exclusion, and.git/node_modules/__pycache__directory skipping. (#1028) -
Product-Builder Tracking Migration:
product-buildernow creates individual per-cycle tracking issues (prefixAUTO-PROD-BLDR) instead of a long-running shared session state issue. Each cycle closes the previous tracking issue and creates a fresh one, providing better isolation and traceability. -
Implementation Orchestrator Scaling: Scaled to 32 parallel workers. Reduced dispatch loop sleep from 10s to 2s, simplified worker verification, reduced retry delays from 15s to 2s, and reduced idle sleep from 60s to 10s for dramatically faster throughput.
Fixed
-
Plan Concurrency Race Condition (#7989): Fixed critical race condition in
execute_plan()andapply_plan()where concurrent CLI/worker sessions could simultaneously modify the same plan, corrupting plan state.LockServiceis now wired into the plan lifecycle with plan-level advisory locking. Each invocation generates a unique caller identity (UUID) to prevent re-entrant lock acquisition by concurrent sessions on the same plan. Concurrent attempts now raiseLockConflictErrorinstead of silently racing. Lock is acquired before phase transition and released in afinallyblock to ensure cleanup even on error. -
--format colorANSI Output (#7910): Fixedformat_outputrouting thecolorformat option to_format_plain, which produced plain uncoloured text instead of ANSI escape sequences. Thecolorformat is now routed toformat_output_sessionwhich uses theColorMaterializerto emit proper ANSI-coloured output.--format plainand all other formats remain unaffected. -
ContextTierService Thread Safety (#7547): Added
threading.RLocktoContextTierServiceto preventRuntimeError: dictionary changed size during iterationand data corruption under concurrent plan execution. All public methods (store,get,promote,demote,evict_lru,enforce_staleness,get_metrics,get_all_fragments,get_hot_fragments,get_for_actor,get_scoped_view,get_scoped_by_resource,get_scoped_metrics) now acquire the reentrant lock before accessing the hot/warm/cold tier dicts. The service was previously documented as single-threaded but registered as a DI Singleton, causing potential data corruption when parallel subplans shared the same instance. TheTierRuntimeMixin.enforce_staleness()andScopedTierMixin.get_scoped_by_resource()/get_scoped_metrics()methods are also protected. The DI container registration asproviders.Singletonis now correct and safe. -
TOCTOU Race Condition in Git Worktree Sandbox (#7507): Fixed Time-Of-Check-To-Time-Of-Use race condition in
GitWorktreeSandbox.create()by replacing unsafe mkdtemp+rmdir pattern with persistent parent directory approach. Parent directory is now held throughout operation lifetime and properly cleaned up in all error paths (timeout, CalledProcessError, OSError) and in the cleanup() method, eliminating race window where another process could claim the worktree path. Comprehensive BDD coverage added for all error-path cleanup branches. -
Validation Gate Empty-Run Guard (#7508): Fixed
ApplyValidationSummary.all_required_passedreturningTruewhen zero validations were run, silently bypassing the apply gate. The property now returnsFalsewhen the validation result set is empty (is_emptyisTrue), ensuring that apply is blocked unless at least one validation was actually executed. Also addedrequired_totalproperty for completeness. Updatedconsolidated_validation.featurescenarios to reflect the corrected blocking behavior for empty summaries and no-attachment runs. -
ACMS context tier hydration:
ContextTierServiceno longer starts empty on every CLI invocation. A newcontext_tier_hydrator.pyreads files from linked project resources (viagit ls-filesoros.walk), createsTieredFragmentobjects, and stores them in the tier service before context assembly inLLMExecuteActor.execute(). The LLM now receives real file context during plan execution. Respects max file size (256 KB), total budget (10 MB), binary file exclusion, and.git/node_modules/__pycache__directory skipping. (#1028) -
Sandbox root wiring:
_get_plan_executor()now passessandbox_root=.cleveragents/sandbox/, so LLM file output (FILE:blocks) is written to disk during the execute phase. (#4222) -
SubplanExecutionService fail_fast cancellation (#7582): Fixed a race condition where already-running parallel subplans were not cancelled when
fail_fastfired. Previously,Future.cancel()only prevented queued futures from starting but had no effect on in-flight futures that completed afterstop_flagwas set -- theirCOMPLETEresults were incorrectly included in the merge output. The fix adds a post-completion guard that overrides any non-ERRORED/non-CANCELLEDresult toCANCELLEDwhenstop_flagis active, and clears the associated output to prevent it from entering the merge. Also replaces the O(n) linearstatuslookup in theas_completed()loop with an O(1)status_mapdict pre-computed before the executor block. -
Robot Framework TDD Listener Guards (#5436): Added three guard conditions to the
tdd_expected_fail_listenerend_test()function to prevent blindly inverting ALL test failures to passes, which was masking infrastructure errors and causing flaky CI behavior. Guards: setup/teardown error detection, non-assertion failure detection (infrastructure errors), and dry-run mode detection. Also fixedVariable Should Existsyntax errors in e2e test files and removedtdd_expected_failfrom 4 context assembly e2e tests where bugs were already fixed. -
PluginLoader entry point prefix validation (#7476): Parse entry point targets before import, enforce the module allowlist ahead of loading, and add Behave plus Robot Framework regression coverage to ensure disallowed prefixes never execute untrusted module-level code in either unit or integration flows.
-
issue-state-updaterBash Script Errors: Removed problematic bash script examples that tried to invoketask forgejo-label-manageras a bash command (the Task tool cannot be invoked from bash). Replaced with clear step-by-step operational instructions and direct label management via API. -
automation-tracking-managerLabel Delegation Syntax: Fixed incorrect delegation syntax when callingforgejo-label-manager. The manager now uses correct natural language requests (e.g., "Apply labels to issue #123: Automation Tracking") instead of structured parameters, ensuring tracking issues receive proper labels. -
product-builderMissing Supervisors: Added missingpr-fix-pool-supervisorandpr-merge-pool-supervisorto the product-builder's supervisor launch list (18 total supervisors). Updated all numeric references, pre-flight checklists, and validation logic. -
ActionRepository.update()now uses explicit bulksa_delete()+session.flush()before re-inserting child rows foraction_argumentsandaction_invariants, fixing asqlite3.IntegrityError: UNIQUE constraint failedcrash whenagents plan usewas called on an action that already had arguments registered viaaction create. (#4197) -
ACMS Indexing Pipeline CLI Wiring:
ContextTierServicewas starting empty on every CLI invocation, causing the LLM to receive zero file context during plan execution. Addedcontext_tier_hydrator.pythat reads files from linked project resources (viagit ls-filesoros.walk) and stores them asTieredFragmentobjects in the tier service. Hydration runs automatically before context assembly inLLMExecuteActor.execute(). Respects max file size (256KB), total budget (10MB), binary file exclusion, and.git/node_modules/__pycache__directory skipping. (#1028) -
CI Lint: Resolved 51 ruff violations in
scripts/validate_automation_tracking.py(import ordering, deprecatedtypinggenerics, unused imports, line-length, whitespace). -
CI Integration Tests: Removed stale
tdd_expected_failtag fromrobot/coverage_threshold.robot— the underlying bug (issue #4305) is resolved and the tag was inverting a passing test to a failure. (#5266) -
Orchestrator Worker Dispatch: Fixed
verify_worker_started()to handle the dict response format from the OpenCode API/session/statusendpoint instead of an array. Workers now dispatch and verify correctly, preventing incorrect session deletion.
[3.8.0] -- 2026-04-05
Added
-
Wired Invariant Reconciliation Actor auto-invocation into
PlanLifecycleServicephase transitions (start_strategize,execute_plan,apply_plan). Reconciliation failures now block the transition withReconciliationBlockedErrorand emitINVARIANT_VIOLATEDevents. Post-correction reconciliation runs viaCORRECTION_APPLIEDevent subscription (best-effort). AddedInvariantServiceSingleton provider in the DI container. -
TUI -- Shell danger detection: The TUI shell mode (
!prefix) now detects dangerous command patterns before execution. A configurable pattern registry classifies commands by danger level (warning, critical) and surfaces a user warning overlay before proceeding. Patterns cover destructive filesystem operations, privilege escalation, network exfiltration, and more. (#1003) -
TUI -- Permission Question Widget: A new inline
PermissionQuestionWidgetrenders permission requests directly in the conversation stream for single-file operations. Users can allow/reject with single-key shortcuts (a/A/r/R), navigate with arrow keys, confirm withEnter, or pressvto open the full