Skip to content

Register code abilities after abilities init#437

Merged
chubes4 merged 1 commit into
mainfrom
late-ability-registration
May 20, 2026
Merged

Register code abilities after abilities init#437
chubes4 merged 1 commit into
mainfrom
late-ability-registration

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 20, 2026

Summary

  • Register Data Machine Code abilities immediately when their classes are instantiated after wp_abilities_api_init has already fired.
  • Cover the late-registration path for workspace and code-task abilities so datamachine/workspace-show remains available in runtimes that activate DMC inside an already-booted WordPress request.

Why

WP Codebox activates Data Machine Code inside a Playground request. In that shape, wp_abilities_api_init may already have fired before DMC ability classes are constructed, so the previous pattern skipped registration instead of registering immediately.

Testing

  • php tests/smoke-late-ability-registration.php
  • php -l inc/Abilities/WorkspaceAbilities.php && php -l inc/Abilities/GitHubAbilities.php && php -l inc/Abilities/GitSyncAbilities.php && php -l inc/Abilities/WordPressRuntimeAbilities.php && php -l inc/Abilities/CodeTaskAbilities.php && php -l tests/smoke-late-ability-registration.php

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Traced the wp-codebox World Creator failure to DMC late ability registration, implemented the registration fix, and added smoke coverage; Chris reviewed the ownership question interactively.

@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented May 20, 2026

Homeboy Results — data-machine-code

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
ℹ️ Save lint baseline: homeboy lint data-machine-code --baseline
Deep dive: homeboy lint data-machine-code --changed-since 541e391

Test

test — passed

ℹ️ Auto-fix lint issues: homeboy refactor data-machine-code --from lint --write
ℹ️ Collect coverage: homeboy test data-machine-code --coverage
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine-code --changed-since 541e391

Audit

audit — passed

  • intra-method-duplication — 10 finding(s)
  • dead_code — 6 finding(s)
  • test_coverage — 5 finding(s)
  • repeated_literal_shape — 2 finding(s)
  • structural — 2 finding(s)
  • Abilities — 1 finding(s)
  • requested_detectors — 1 finding(s)
  • Total: 27 finding(s)

Deep dive: homeboy audit data-machine-code --changed-since 541e391

Tooling versions
  • Homeboy CLI: homeboy 0.188.11+bb128a4
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 8ec77fb4
  • Action: unknown@unknown

@chubes4 chubes4 merged commit 6dab878 into main May 20, 2026
5 checks passed
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