Repository navigation
fix(audit): preserve project scope across native Windows path spellings - #3316
Conversation
Add installed-CLI cold clone, repeated/warm audit, real damage and global-scope controls. Native Windows long/8.3 identity must be established by the existing Windows Compatibility Gate before production repair. Refs #3205. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f1451aff-977f-4f55-86bb-5ab717a4f06f
Docs sync advisoryVerdict: no_change * Pages affected: 0 * LLM calls: 1/15 At The delegated classifier had no repository tools. The orchestrator executed the path gate directly and validated its result against the classifier schema; no independent prose review is claimed. Generated by docs-sync. This comment is AI-generated and may contain errors. |
Preserve original project paths and existing global refusal. Add native Git pin and repeated warm controls alongside the original Windows red, protect the comparison through the existing architecture guard, and clarify project-only replay guidance. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f1451aff-977f-4f55-86bb-5ab717a4f06f
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| DevX UX | 0 | 0 | 0 | Narrow repair and truthful docs; genuine global recovery preserved. |
| Test coverage | 0 | 2 | 0 | Both observations requested native proof rather than additional structure; actual Windows green now resolves them. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 1 follow-up
- [Test coverage] Consider an additional
lifecycle_smokemarker. The independent synthesizer treated this as optional becausewindows_compatalready selects the actual native contracts. Disposition: considered and retained the narrower existing scheduling route; no marker or workflow change is needed.
Original engineering recommendation
The independent CEO synthesizer recommends ship_now: the two conditional coverage observations are resolved by actual native execution at 023f35560, and DevX found no remaining issue. No source changes occurred after those reviews. Landing remains exclusively with the designated Merge Master, not this implementing agent.
Evidence precision: the separate exact-head POSIX preservation run passed 262 tests. The mutation/restoration run deliberately failed three selected tests, restored source bytes in finally, then passed 21 tests. Those are branch/static mutations, not native normalization-removal execution; native normalization evidence is the preserved original-red / repaired-green pair.
Full per-persona findings
DevX UX
No findings. The reviewer checked the existing scope helper, the narrow operand change, and all three documentation surfaces.
Test coverage
- [recommended] Runtime regression trap for
.resolve()normalization is Windows-only; the POSIX control cannot detect that particular removal. The reviewer found the native fixture correctly designed and requested its pending execution result, not a replacement test. The static compound mutation already passed. Resolved: all native lifecycle rows now pass at the reviewed head. - [recommended] POSIX lifecycle proof alone does not establish the native normalization promise's runtime tier. The reviewer explicitly said Windows green resolves this observation. Resolved: actual installed-CLI Windows execution proves the promise with distinct native aliases, same-file checks and unchanged-state assertions.
These related observations were retained rather than rewritten into a claimed clean pre-CI review. The later deterministic evidence was supplied to the independent CEO synthesizer.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Convergence evidence
- Folded in this run: both conditional native-proof observations are resolved by actual repaired-head execution. The optional extra smoke marker was considered and the existing native route retained; no required source follow-up remains.
- Copilot signals reviewed: review 5597036010 on
023f35560recommends approval with no open issues. Its GitHub state isCOMMENTED, not a human approval. No inline findings remain. - Lint: the full current canonical local mirror and exact-head CI Lint passed, including covered scripts, grep guards, R0801 and architecture/auth boundaries.
- Owner-v2: exact base
cba243f12dc4888e1b34dca978e53af6e744f802/ head023f35560f6ac73313d69d64316d9ccfced4db94; schema and semantic verification passed. No registered owner selector is touched. The ordinary fix preserves existing authorities while strengthening their consumer's behavioral/static regression protection. - CI: reported test/build gates are green; original native-red and restored mutation evidence above remain preserved. Native CodeQL check 119112131290 is completed
NEUTRAL, title1 configuration not found. Its output says theAPI upload <default>configuration on main was not found for this PR, so introduced alerts cannot be determined. Active ruleset9294522requires CodeQL (errors/high_or_higher). Modern Analyze success and the rollup observed at gate investigation (27 checks: 24 success, 2 neutral, 1 skipped) do not satisfy this missing comparison.
| PR | Head | Original CEO stance | Iterations | Source defers | Copilot rounds | Test/build CI | Mergeable | Landing |
|---|---|---|---|---|---|---|---|---|
| #3316 | 023f35560 |
ship_now |
1 | 0 | 1 | green | MERGEABLE | BLOCKED before explicit exception |
Historical landing disposition before the new authorization: BLOCKED. This was the concrete required native CodeQL comparison gap, not merely an ordinary pending review. No applicable exception existed then. The old blocked completion and reviewer returns remain preserved; the new authorization below changes the gate disposition, not the underlying scan result.
The PR is no longer a draft and is Git-mergeable. #3205 remains open pending authorized landing. The automatic CODEOWNERS request is preserved. No source edit, passing-CI rerun, scan/config deletion, SARIF mutation, repository security-policy change, approval or self-merge was performed by this worker.
Prior independent missing-analysis evidence delta
The CEO persona independently revised its stance from ship_now to needs_discussion, solely because the required native CodeQL comparison is undetermined. The original DevX/coverage findings and native engineering evidence remain unchanged. This is an external evidence gap, not a newly discovered source defect or a demonstrated vulnerability. The reviewer does not recommend bypassing the rule or treating the missing comparison as clearance.
The original synchronous reviewer could not be resumed by the runtime. The same CEO persona was re-entered with its exact original return and only this new evidence; no source review, panel fan-out or tests were repeated. Its initial delta contained inaccurate count attribution and unsupported cross-PR/configuration speculation; a same-thread factual correction pass removed those claims. Both raw returns are retained separately. This revised stance is the independent reviewer's actual return, distinct from the factual worker/Merge Master appendix above.
Prior worker disposition: BLOCKED. This history is superseded only as a merge gate by the explicit authorization below; its native evidence remains accurate.
New authorization and actual independent reassessment
On 2026-10-21 the maintainer directly instructed:
missing codeql analysis is not a reason not to merge, bypass merge PRs even if that CodeQL analysis is missing. It is an imposed external analysis that we cannot run.
The same CEO persona independently reassessed only this authorization against its retained returns. The previous runtime thread was lost in the crash, so the persona was re-entered with those exact returns; no source review, full panel, passing tests or CI was replayed. Its actual recommendation is ship_with_followups, not a forced ship_now.
The reviewer retains the missing-analysis fact as a nonblocking disclosure, not work to manufacture or run an unavailable external scan. The optional lifecycle_smoke consideration remains resolved by retaining the existing windows_compat route. No new issue, configuration change or security-setting action is required by these follow-ups. An initial authorization delta's ruleset/baseline wording and unsupported future-PR extrapolation were corrected in the same reviewer thread; both returns are preserved.
Current worker disposition: ready candidate under the explicit missing-analysis exception. Native CodeQL remains NEUTRAL with introduced alerts undetermined; neither the exception nor successful Analyze jobs make it pass. The exception does not waive actual alerts, unrelated CI failures or other review requirements, and rule 9294522 is unchanged. The designated Merge Master must independently verify the retained exact-source, native red/green and owner-v2 proof before landing, using its exclusive merge authority. This advisory does not claim that verification or merge has occurred.
Merge Master final readiness: ship_now
My independent landing assessment for exact head 023f35560f6ac73313d69d64316d9ccfced4db94 is ship_now. This is the Merge Master's completed qualification, distinct from the independent CEO's retained ship_with_followups recommendation.
The complete accepted #3205 scope is supported by actual native evidence: the original Windows run failed four project cases while its global control passed; the repaired head passed all six new lifecycle rows, with 803 family passes and two unrelated skips. The retained 262 POSIX preservation passes, three deliberate causal failures and 21 restored passes, canonical lint, static guard and documentation evidence remain intact. I independently read the original red/green and preservation/mutation records and matched all 16 indexed artifacts. The coordinator independently verified the actual ready completion against fresh exact-base/head owner detection: terminal evidence required, verified true, zero touched registered owners. No synthetic completion or repeated test run substitutes for that proof.
Source and metadata ownership are released. No required in-scope finding remains. The optional additional smoke marker was already considered; the existing native Windows route is retained.
Main advanced only through the independently qualified #3307 merge to 8738c6ff5a3220be788b8031a88fa8b22e61d6f6. A bounded integration check produced a clean combined tree, 05fb8c42632341f79761bff3a0d0267a33e7e0e8: the only shared files have separate guide sections and separate frozen/audit linter functions, and the canonical owner table is unchanged. Existing native results remain explicitly bound to their original tested head/base; this compatibility assessment is not a new native test result.
CodeQL check 119112131290 remains NEUTRAL / introduced alerts undetermined, with main's API upload <default> counterpart absent on the PR. The user's explicit exception permits bypass of this imposed missing-analysis condition; it does not make the analysis pass or waive actual vulnerabilities or unrelated failures. No security, workflow or SARIF settings were changed.
The exclusive Merge Master will execute a fresh head-guarded normal merge and verify its exact parents and combined tree. The full accepted issue can then be marked complete; this assessment does not itself claim that either write has occurred.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues remain, and verified repair-head CI includes a successful Windows Compatibility Gate.
No open issues 🎉
What changed in this PR
Fixes #3205's audit scope misclassification by comparing resolved workspace paths while preserving replay inputs and global behavior.
Changes:
- Normalizes the project-scope comparison.
- Adds native Windows lifecycle coverage and a static regression guard.
- Documents project replay requirements and global recovery boundaries.
| File | Description |
|---|---|
| tests/integration/test_audit_workspace_identity_lifecycle.py | Covers native aliases, cold/warm audits, damage, and global refusal. |
| tests/integration/test_architecture_install_compound_mutations.py | Tests detection of the original comparison regression. |
| src/apm_cli/commands/audit.py | Resolves the project path before comparing scope. |
| scripts/architecture_linter/checks/install_frozen_and_audit.py | Guards the normalized comparison. |
| packages/apm-guide/.apm/skills/apm-usage/commands.md | Updates agent-facing audit guidance. |
| docs/src/content/docs/troubleshooting/install-failures.md | Clarifies local-source and global recovery. |
| docs/src/content/docs/reference/cli/audit.md | Documents native path equivalence and replay boundaries. |
Review effort: Balanced
Preserve landed #3316 audit path identity and prior #3307 frozen-service changes without changing the ordinary acquired-manifest fix. Co-authored-by: Copilot App <[email protected]> Copilot-Session: daed9f36-025c-4757-85ea-54b8aaf9442d
fix(audit): preserve project scope across native Windows path spellings
Description
TL;DR
Fix the false
apm install --globalrefusal when Windows spells a project checkout with native 8.3 names. Audit now compares resolved identities while preserving its original configuration root and existing replay path. Actual installed-CLI Windows execution first reproduced the defect, then passed all six repaired lifecycle rows on the same PR.Important
Reviewed head:
023f35560f6ac73313d69d64316d9ccfced4db94.Original native red is retained at
28a647e49; no history was rewritten.Missing external CodeQL analysis is no longer a merge blocker under the maintainer's explicit authorization on 2026-10-21. Native check 119112131290 remains neutral:
1 configuration not found. Main'sAPI upload <default>counterpart is absent, so introduced alerts remain undetermined; the scan has not passed.The exception permits the designated Merge Master to bypass this missing-analysis gate if otherwise qualified. It does not waive actual alerts, unrelated failures or review requirements, and does not change rule
9294522, workflows, scans or SARIF. Independent qualification of the retained exact-head source/native/owner evidence remains with the Merge Master; no merge is claimed here.The actual independent authorization-only reassessment is
ship_with_followups, not an inventedship_nowor a claim that CodeQL passed.Problem (WHY)
samefile, and a child-cwd probe proved distinct spellings of the same filesystem identity before those failures. The long-spelling clean audit passed before the short-spelling failure.Evidence-first work follows "Run the skill against real tasks, then feed the results — all of them, not just failures — back into the creation process.".
Approach (WHAT)
Implementation (HOW)
src/apm_cli/commands/audit.py.resolve()to the comparison operand; original root still reaches the existing replay owner.tests/integration/test_audit_workspace_identity_lifecycle.pyscripts/architecture_linter/checks/install_frozen_and_audit.pytests/integration/test_architecture_install_compound_mutations.py.resolve().docs/src/content/docs/reference/cli/audit.mddocs/src/content/docs/troubleshooting/install-failures.mdpackages/apm-guide/.apm/skills/apm-usage/commands.mdDiagram
The highlighted sequence observes the same physical checkout through native aliases around the repaired scope comparison.
sequenceDiagram participant T as Installed CLI lifecycle test participant F as Isolated filesystem participant A as APM CLI T->>A: Install baseline from sibling source A->>F: Write manifest lock and deployment T->>F: Commit and clone without modules rect rgb(255, 247, 200) T->>F: Verify native long and short names share identity T->>A: Audit first and repeated cold state A-->>T: Exit code and JSON checks T->>F: Compare independent before and after snapshots end T->>A: Warm install then audit Note over T,A: Audit compares resolved identities but preserves original replay pathsTrade-offs
windows_compatroute rather than adding workflows, permissions, volume-policy changes, alias skips or redundant smoke scheduling.ghdevice state before snapshots. No snapshot exclusion or production-auth change hides that external helper write.Benefits
Issue and approved scope
Issue: Refs #3205
Human scope-approval comment: #3205 (comment)
The bounded source repair and native lifecycle proof are complete at the reviewed head. The previously missing external CodeQL comparison is now explicitly waived as a blocking gate, not relabeled as passing. #3205 remains open pending the designated merger's independent qualification and authorized landing. Trusted-default governance returned
record-presentwithauthorizes_implementation: false; separate human execution delegation authorized delivery. This PR adds no global cold replay, broad path refactor, schema change, flags, symlink support, hook behavior or Windows bypass in product code.Type of change
Testing
Validation
Native Windows:
uv run --extra dev pytest -p no:cacheprovider -v -m windows_compat tests/unit tests/integrationpassed in the existing Windows Compatibility Gate, exact head023f35560:All six new rows explicitly report
PASSED; neither skip is a new row. The original native run remains red and attributable to28a647e49.Local targeted matrix:
APM_E2E_TESTS=1 APM_BINARY_PATH="$PWD/.venv/bin/apm" .venv/bin/python -m pytest -p no:cacheprovider -q tests/integration/test_audit_workspace_identity_lifecycle.py tests/integration/test_audit_cold_cache_ci_e2e.py tests/integration/test_architecture_install_compound_mutations.py -k 'workspace_identity or cold_cache or audit-replay'passed:Exact-head preservation and mutation evidence
Executed at
023f35560on macOS/Python 3.12.10 through the campaign capacity wrapper:APM_E2E_TESTS=1 APM_BINARY_PATH="$PWD/.venv/bin/apm" .venv/bin/python -m pytest -p no:cacheprovider -q \ tests/integration/test_audit_workspace_identity_lifecycle.py \ tests/integration/test_audit_cold_cache_ci_e2e.py \ tests/integration/test_audit_skill_subset_replay.py \ tests/integration/test_global_audit_deploy_root.py \ tests/integration/test_audit_dependency_skill_links_e2e.py \ tests/unit/test_audit_ci_command.py tests/unit/test_audit_ci_auto_discovery.py \ tests/unit/test_audit_deployment_owners.py tests/unit/install/test_drift.py \ tests/unit/install/test_drift_detection.py \ tests/unit/install/test_local_content_symlink_deref.py \ tests/integration/test_architecture_install_compound_mutations.pyA bounded mutation script forced project refusal, removed genuine global refusal, then removed the static identity guard. Each selected real-CLI/static test failed with exit 1;
finallyrestored source bytes, and the restored matrix passed21 passed, 61 deselected in 40.10s. These are POSIX branch/static mutations, not native normalization-removal execution. The native original-red/repaired-green pair separately proves normalization.Earlier failed test iterations are preserved: the initial POSIX assertion expected
missinginstead of existingunintegrated; the new Git control exposed isolatedghdevice initialization. Corrected fixture expectations/setup without changing production to hide them.Canonical lint and exact-head convergence
All local
uv runcommands usedUV_NO_SYNC=1 UV_PYTHON_DOWNLOADS=neverwith owned frozen dependencies. Full current lint passed locally and in exact-head CI Lint.uv run --frozen --extra dev ruff check src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.pyAll checks passed!uv run --frozen --extra dev ruff format --check src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py2020 files already formatteduv run --frozen --extra dev python -m pylint --disable=all --enable=R0801 --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py10.00/10bash scripts/lint-auth-signals.shbash scripts/lint-architecture-boundaries.shmmdc -i reproduction-flow.mmd -o reproduction-flow.svg --quietordinary-fix, existing authority retainedgate119112131290/ active rule9294522API upload <default>counterpart absent; introduced alerts undetermined. Maintainer explicitly waived this missing-analysis merge gate.Independent DevX and test-coverage review plus CEO synthesis produced the linked original engineering advisory. Both conditional native-evidence observations were resolved by actual Windows results. Automatic Copilot review 5597036010 found no open issues at this head; its state is
COMMENTED, not human approval. Docs impact isin_place_resolved; the affected pages and shipped guidance are already patched.Review history is preserved: original engineering
ship_now, then actualneeds_discussionwhen the missing comparison was established without an exception. Neither historical stance is rewritten. The new maintainer decision is: "missing codeql analysis is not a reason not to merge, bypass merge PRs even if that CodeQL analysis is missing. It is an imposed external analysis that we cannot run."The same CEO persona reassessed only that new authorization using its retained returns (the prior runtime thread was lost in the crash). Its actual stance is
ship_with_followups: retain the missing-analysis disclosure and the existing optional marker consideration, already addressed by keepingwindows_compat. No new issue, source change or external-analysis execution is a prerequisite from this advisory. The merger must still independently qualify the retained exact-head proof and other requirements.The missing comparison remains disclosed independently of the new authorization. Original native red/green and mutation evidence are unchanged. Requalification changes only metadata, the same advisory and completion evidence; no source edits, passing-test/CI replay, scan/config deletion, SARIF mutation, repository-policy change or self-merge occurred.
Scenario Evidence
test_audit_workspace_identity_lifecycle.py::test_fresh_clone_audit_preserves_identity_across_cold_repeated_and_warm_runs(regression-trap for #3205)test_cold_clone_audit_reports_real_damage_without_writing_live_statetest_genuine_global_metadata_audit_preserves_missing_materialization_refusal[git]row; unchangedtests/integration/test_audit_cold_cache_ci_e2e.pyandtest_audit_skill_subset_replay.pyAll three abbreviated test names above are in
tests/integration/test_audit_workspace_identity_lifecycle.py.How to test
Spec conformance (OpenAPM v0.1)
If this PR changes behaviour that an OpenAPM v0.1
req-XXXcovers,confirm the three-step ritual in the
development guide:
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.
No normative contract is added or redefined. Existing req-pl-014 fail-on-drift, req-pl-016 ownership failure and req-pl-020 protected/read-only discovery decisions are unchanged. This corrects project-scope classification, with no invented requirement marker, waiver or generated conformance claim. The actual spec conformance job passed.
Co-authored-by: Copilot [email protected]