Skip to content

feat: support definition-only agents - #3036

Merged
chubes4 merged 1 commit into
mainfrom
feat/3034-definition-only-agents
Jul 28, 2026
Merged

feat: support definition-only agents#3036
chubes4 merged 1 commit into
mainfrom
feat/3034-definition-only-agents

Conversation

@chubes4

@chubes4 chubes4 commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • allow registered agent definitions to opt out of Data Machine's automatic default reconciliation through meta.datamachine_default_materialization=false
  • report opted-out definitions separately as definition_only without creating rows, access grants, directories, scaffolds, or reconciliation hooks
  • preserve explicit, idempotent exact-scope materialization and all existing default reconciliation behavior

Closes #3034

Existing Primitive Investigation

Agents API already separates declarative registration from host-owned materialization. WP_Agent preserves generic meta, wp_materialize_agent_identity() validates the registered definition and constructs an exact WP_Agent_Identity_Scope, and WP_Agent_Identity_Store::materialize() owns idempotent persistence. It does not expose a default-materialization policy field or filter; its registration docs explicitly leave that decision to hosts.

This PR therefore does not change the generic Agents API dependency or add a parallel materialization path. It adds only a Data Machine consumer-owned reconciliation policy in existing definition metadata.

Contract

Definitions retain today's behavior by default. Only an explicit strict-false marker opts out:

'meta' => array(
    'datamachine_default_materialization' => false,
),

Normal AgentRegistry::reconcile() reports that slug under definition_only before resolving a default owner or invoking the identity store. Explicit wp_materialize_agent_identity() calls continue through the registered Agents API definition and Data Machine identity store with the requested owner and instance key, including duplicate-key concurrency handling.

Runtime bundle/import reconciliation remains default-on for definitions without the marker and continues skipping marked definition-only defaults.

Compatibility

  • existing definitions and the default system agent remain default-materialized
  • existing created, existing, and skipped outcomes retain their meaning
  • reconciliation summaries add the definition_only outcome
  • no owner_resolver=0, post-reconciliation deletion, product-specific behavior, or generic-layer vendor vocabulary is introduced

Tests

  • php tests/agent-registry-materializer-smoke.php passes all 37 assertions
  • php tests/runtime-agent-bundle-reconcile-smoke.php passes
  • php tests/agent-prune-resurrection-smoke.php passes
  • homeboy review lint data-machine --path . --placement local --changed-only --summary passes
  • homeboy review audit data-machine --path . --placement local --profile pr --changed-since origin/main --json-summary passes with no introduced findings
  • configured Homeboy test selection identifies 129 tests but returns an unstructured zero-test failure; the focused direct tests above pass, and the runner defect is tracked in fix: WordPress test gate reports zero tests for explicit Roadie test homeboy#10601
@chubes4
chubes4 force-pushed the feat/3034-definition-only-agents branch from dc2a8c9 to e7ef7ed Compare July 28, 2026 14:53
@homeboy-ci

homeboy-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine

Lint

review lint — passed

ℹ️ Full options: homeboy self docs commands/lint
Deep dive: homeboy review lint data-machine --changed-since 2cb96b7

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-review-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-review-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/30370601930

Test

review test — timed out

ℹ️ The test runner failed before producing structured results. See raw_output.stderr_tail / raw_output.stdout_tail for the underlying error (bootstrap failure, missing deps, DB connection, etc.).
ℹ️ To run specific tests: homeboy review test data-machine -- --filter=TestName
ℹ️ Auto-fix lint issues: homeboy refactor data-machine --from lint --write
ℹ️ Collect coverage: homeboy review test data-machine --coverage
ℹ️ Analyze failures: homeboy review test data-machine --analyze
ℹ️ Pass args to test runner: homeboy review test -- [args]
ℹ️ Full options: homeboy self docs commands/test
Deep dive: homeboy review test data-machine --changed-since 2cb96b7

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-review-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-review-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/30370601930

Audit

review audit — failed

Deep dive: homeboy review audit data-machine --changed-since 2cb96b7

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-review-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-review-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/30370601930

Refactor

refactor lint — passed

Deep dive: homeboy refactor lint data-machine --changed-since 2cb96b7

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-refactor-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-refactor-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/30370601930
Tooling versions
  • Homeboy CLI: homeboy 0.321.0+192964f61a7e+e7ef7ed7
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: c75e1822
  • Action: unknown@unknown
@chubes4
chubes4 merged commit c61b504 into main Jul 28, 2026
5 of 7 checks passed
@chubes4
chubes4 deleted the feat/3034-definition-only-agents branch July 28, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant