Skip to content

Pass canonical identity to action policy resolution#2445

Merged
chubes4 merged 2 commits into
mainfrom
fix/action-policy-context
Jun 1, 2026
Merged

Pass canonical identity to action policy resolution#2445
chubes4 merged 2 commits into
mainfrom
fix/action-policy-context

Conversation

@chubes4

@chubes4 chubes4 commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Pass canonical workspace, user_id, acting_user_id, agent_id, agent_slug, and session/request identifiers into action-policy resolution from ToolExecutor.
  • Keep Data Machine job/flow metadata namespaced under datamachine while preserving client_context for client-specific details.
  • Preserve canonical agent identity even when no persisted Data Machine agent config exists, without triggering fallback registered-agent lookups.

Closes #2438.

Tests

  • php -l inc/Engine/AI/Actions/ActionPolicyResolver.php && php -l inc/Engine/AI/Tools/ToolExecutor.php && php -l tests/Unit/AI/Tools/ToolExecutorValidationTest.php
  • vendor/bin/phpcs inc/Engine/AI/Actions/ActionPolicyResolver.php inc/Engine/AI/Tools/ToolExecutor.php tests/Unit/AI/Tools/ToolExecutorValidationTest.php
  • homeboy lint --path /Users/chubes/Developer/data-machine@fix-action-policy-context --extension wordpress --changed-only
  • homeboy test --path /Users/chubes/Developer/data-machine@fix-action-policy-context --extension wordpress

Note: full homeboy lint --path /Users/chubes/Developer/data-machine@fix-action-policy-context --extension wordpress reports an unrelated existing PHPCS finding in inc/Core/FilesRepository/MediaValidator.php for deprecated finfo_close(); changed-file lint passes.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Inspecting the Data Machine/Agents API action-policy boundary, drafting the implementation, adding focused tests, and running verification. Chris remains responsible for review and merge.

@homeboy-ci

homeboy-ci Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
Deep dive: homeboy lint data-machine --changed-since 9525289

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-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/26786154877

Test

test — passed

  • 798 passed

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

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-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/26786154877

Audit

audit — passed

  • audit — 407 finding(s)
  • Total: 407 finding(s)

Deep dive: homeboy audit data-machine --changed-since 9525289

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-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/26786154877
Tooling versions
  • Homeboy CLI: homeboy 0.216.2+cf2ee011
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 477fc192
  • Action: unknown@unknown

@chubes4 chubes4 merged commit 7e11966 into main Jun 1, 2026
5 checks passed
@chubes4 chubes4 deleted the fix/action-policy-context branch June 1, 2026 22:41
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.

Pass canonical user, workspace, and agent identity into action-policy resolution

1 participant