Skip to content

Resolve mounted paths through workspace refs#797

Merged
chubes4 merged 4 commits into
mainfrom
fix/mounted-path-workspace-ref
Jul 1, 2026
Merged

Resolve mounted paths through workspace refs#797
chubes4 merged 4 commits into
mainfrom
fix/mounted-path-workspace-ref

Conversation

@chubes4

@chubes4 chubes4 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Preserve mounted workspace refs when adopting mounted runtime workspaces.
  • Resolve mounted absolute paths through workspace refs before falling back to basename matching.
  • Stream bounded workspace reads instead of loading whole files when callers provide offset/limit.

Verification

  • php tests/smoke-workspace-file-policy.php
  • php tests/mounted-runtime-context.php
  • php tests/mounted-workspace-path-alias.php
  • git diff --check

AI assistance

  • AI assistance: Yes
  • Tool(s): openai/gpt-5.5 via OpenCode
  • Used for: Diagnosing mounted workspace identity and bounded read failures, implementing focused fixes, and running smoke validation.

@homeboy-ci

homeboy-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine-code

Lint

lint — passed

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

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

Test

test — passed

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

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

Audit

audit — passed

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

Deep dive: homeboy audit data-machine-code --changed-since 11fd9ef

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-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-code/actions/runs/28486031686
Tooling versions
  • Homeboy CLI: homeboy 0.275.0+86f4e066814d+2964b38
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 63d7a888
  • Action: unknown@unknown

homeboy-ci Bot and others added 3 commits July 1, 2026 00:45
PHPStan level 7 flagged two errors on this PR's diff:
- MountedRuntimeBootstrap::mounted_workspace_path_aliases(): the mount
  shape guarantees a non-null 'path' string, so the ?? '' fallback was
  a redundant null-coalesce.
- WorkspaceAbilities::mounted_workspace_path_aliases(): the callee
  returns array<string,string>, so the is_array() guard always
  evaluated to true.

Drop both redundant guards to get the Lint check green.
@chubes4 chubes4 force-pushed the fix/mounted-path-workspace-ref branch from 0d15f35 to f733c22 Compare July 1, 2026 00:51
The streaming read path in WorkspaceReader uses fopen/fread/fclose for
bounded/offset reads (WP_Filesystem has no streaming API). The existing
phpcs:ignore on fopen referenced the wrong sniff code
(file_system_read_fopen) and the fread/fclose calls had no ignore at
all, so PHPCS flagged 6 file_system_operations warnings that failed
Lint. Correct the fopen code and annotate the fread/fclose calls with
the exact reported sniff codes.
@chubes4 chubes4 merged commit cbc5bd3 into main Jul 1, 2026
5 checks passed
@chubes4 chubes4 deleted the fix/mounted-path-workspace-ref branch July 1, 2026 01:20
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