Skip to content

fix(git-env): skip the HTTP header probe for non-HTTP effective URLs - #2906

Merged
Daniel Meppiel (danielmeppiel) merged 5 commits into
microsoft:mainfrom
arnaudoisel:fix/insteadof-urlmatch-probe
Sep 15, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 5 commits into
microsoft:mainfrom
arnaudoisel:fix/insteadof-urlmatch-probe

Conversation

@arnaudoisel

@arnaudoisel Arnaud (arnaudoisel) commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

fix(git-env): skip HTTP header probes for non-HTTP effective URLs

TL;DR

Fixes private Git dependency downloads when a standard insteadOf rule rewrites HTTPS to SCP-style SSH. HTTP header applicability is checked only for HTTP(S) effective URLs; existing rewrite admission and credential boundaries remain enforced. Genuine probe failures now identify the exit status and recommend inspecting configuration rather than deleting a rule not proven unsafe.

Note

Fixes #2898. Original fix and reproduction by Arnaud (@arnaudoisel); the original commits are preserved. Follow-up consumer regressions, diagnostics, and documentation are included in this PR.

Problem (WHY)

  • On the authenticated retry, a command-scoped http.extraHeader caused Git's URL-match probe to receive an SCP target such as [email protected]:owner/repo.
  • Git returns status 128 for that input: fatal: invalid URL scheme name or missing '://' suffix. This surfaced as Unable to verify Git URL rewrite safety during the reported private dependency installation.
  • [!] The previous recovery text also told users to remove an unsafe rule when only the probe itself had failed.

The contributor's #2898 reproduction requires a matching rewrite, an injected authorization header, and an actual download. A public dependency without an injected header does not trigger the same probe.

[url "[email protected]:"]
    insteadOf = https://github.com/

The contributor measured Git 2.55.0 with a dummy command-scoped header:

Effective URL form URL-match exit status
https://github.com/o/r 0
ssh://[email protected]/o/r 0
[email protected]:o/r 128

Approach (WHAT)

  • Skip HTTP header applicability probes for non-HTTP(S) effective targets.
  • Keep rewrite validation in the existing shared owner used by both Git execution and GitConfigInsteadOfResolver.
  • Defer malformed URL rejection to the existing wrapped validator, without leaking parser details.
  • Keep inspection guidance for probe failures separate from unsafe-rule removal guidance for proven policy violations.
  • Exercise the real Git config subprocess and production consumers with isolated files and dummy credentials.

Implementation (HOW)

File Change
src/apm_cli/utils/git_env.py Adds the protocol guard, preserves malformed-URL error wrapping, includes probe exit status, and separates inspection from unsafe-rule recovery.
tests/unit/cache/test_git_env.py Covers SCP cloning with an injected header, no-probe behavior, malformed targets, and status/redaction diagnostics.
tests/unit/test_transport_selection.py Uses the real resolver, selector, Git configuration, and child environment; covers SCP, no header, unmatched rules, ssh://, and authenticated HTTPS origin rejection.
tests/unit/core/test_public_github_anonymous_first.py Drives the real anonymous-to-authenticated retry with Git config fixtures; verifies HTTP authorization is absent from the SSH child while its rewrite remains.
docs/src/content/docs/getting-started/authentication.md Documents the HTTP(S)-only probe boundary and configuration inspection guidance.
packages/apm-guide/.apm/skills/apm-usage/authentication.md Mirrors the authentication guidance for agents.
CHANGELOG.md Records the private dependency install fix.

Diagrams

The new non-HTTP branch skips only header applicability; both branches still reach rewrite validation.

flowchart LR
    R["resolve_git_url_rewrite"] --> H["_has_applicable_http_authorization"]
    H --> S{"HTTP or HTTPS?"}
    S -->|"yes"| P["Git URL-match probe"]
    S -->|"no"| N["Return no HTTP authorization"]
    P --> V["validate_resolved_git_url_rewrite"]
    N --> V
    V --> C["Validated child Git environment"]
    classDef changed stroke-dasharray: 5 5;
    class S,N changed;
Loading

Trade-offs

  • This extends the existing owner rather than changing AuthResolver or credential selection. Same-host SSH remains credential-free; HTTPS origin checks remain active.
  • Consumer regressions use real Git config and real production auth/transport boundaries with a controlled failing network callback. They do not claim a full installed-CLI private-network download.
  • Parser ValueError is deferred to the shared validator so malformed targets still fail with the wrapped, redacted message; it is not treated as an accepted rewrite.

Benefits

  1. The authenticated HTTPS-to-SCP reproduction no longer fails at Git's HTTP URL-match parser.
  2. Matching HTTPS rewrites still reject credential origin changes.
  3. Probe failures retain actionable inspection guidance without declaring an unverified rule unsafe.

Validation

Exact head: 221b7debb069e057861b2a50f96bcc4e9918feff; integrated main: e38261c5db4d893d6ddebc3925742e4e3bd2ba74.

UV_FROZEN=true uv run --extra dev pytest -q tests/unit/cache/test_git_env.py tests/unit/core/test_git_transport_policy.py tests/unit/test_transport_selection.py tests/unit/core/test_public_github_anonymous_first.py tests/unit/install/test_validation_strict_transport.py tests/unit/cache/test_proxy_compat.py

253 passed in 17.72s

All seven local CI lint gates and the architecture boundary lint passed on this head. Mutation checks produced five SCP failures without the protocol guard, one malformed-URL failure without its wrapper, two diagnostic failures with old wording, and one HTTPS failure with a blanket probe skip. All mutations were restored before the final run.

Warning

Hosted CI has not run successfully on this head. CI, CodeQL, Spec conformance, Merge Gate, NOTICE Drift Check, and Deploy Docs concluded action_required. See CI run 34413898041. Maintainer action is required; local results are not a substitute for hosted CI.

Scenario Evidence

# Scenario (user promise) Principle(s) Test(s) proving it Type
1 A standard HTTPS-to-SCP rewrite works while an HTTP authorization header is present. DevX (pragmatic as npm), Secure by default tests/unit/test_transport_selection.py::TestGitConfigInsteadOfResolver::test_real_resolver_allows_https_to_scp_ssh_rewrite (regression-trap for #2898) integration
2 A private dependency's authenticated retry keeps the SSH rewrite without passing HTTP credentials to its child. Secure by default, DevX (pragmatic as npm) tests/unit/core/test_public_github_anonymous_first.py::test_public_github_authenticated_retry_drops_header_after_real_ssh_rewrite (regression-trap for #2898) integration
3 Existing no-header, unmatched-rule, and ssh:// configurations retain their transport selection. DevX (pragmatic as npm) tests/unit/test_transport_selection.py::TestGitConfigInsteadOfResolver integration
4 An authenticated HTTPS rewrite cannot silently change credential origin. Secure by default tests/unit/test_transport_selection.py::TestGitConfigInsteadOfResolver::test_real_resolver_checks_http_authorization_for_https_rewrite integration
5 Malformed targets fail with the wrapped safety message, not raw parser details. Secure by default, DevX (pragmatic as npm) tests/unit/cache/test_git_env.py::TestGitSubprocessEnv::test_malformed_rewrite_target_keeps_the_wrapped_safety_error integration
6 A real probe failure identifies its exit status without exposing raw Git config or recommending unsafe-rule removal. DevX (pragmatic as npm), Secure by default tests/unit/cache/test_git_env.py::TestGitSubprocessEnv::test_http_urlmatch_failure_reports_status_without_raw_config unit

Here, integration denotes real Git configuration and production cross-module boundaries, independent of the existing test directory names.

How to test

  1. Run the exact targeted pytest command above.
  2. Run the repository's canonical lint mirror, including the architecture boundary lint.
  3. Inspect test_real_resolver_consumer_drops_dummy_http_header_after_scp_rewrite for a fixture-backed demonstration; no real token or global Git config change is needed.

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change the manifest or specification contract.

Co-authored-by: Copilot App [email protected]

Maintainer scope approval

Renewed bounded issue-scope approval on #2898. Review contact: Daniel Meppiel (@danielmeppiel), who has confirmed review capacity. This records scope approval, not code-review approval or a release commitment.

An `insteadOf` rule that rewrites the fetched HTTPS URL to SSH, such as
`url."[email protected]:".insteadOf = https://github.com/`, made every private
dependency download fail on the authenticated retry.

`_validated_git_url_rewrite_policy` asked whether an HTTP `extraHeader`
applied to the effective URL. With an SCP-style target that probe ran
`git config --get-urlmatch http.extraHeader [email protected]:owner/repo`,
which git rejects with `invalid URL scheme name or missing '://' suffix`
and exit status 128, so the probe raised `GitUrlRewriteProbeError`.

An HTTP header can never reach a non-HTTP transport, so the answer is
already known: report no authorization and do not spawn the probe. The
remaining non-zero branch now names the exit status instead of only
saying the probe failed.

Fixes microsoft#2898
@arnaudoisel

Copy link
Copy Markdown
Contributor Author

Agreement

@microsoft-github-policy-service agree company="Lucca"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

_has_applicable_http_authorization now calls urlsplit() without guarding ValueError, which can surface as an unwrapped exception for malformed URLs and bypass the module’s consistent rewrite-safety error handling.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Fixes a regression in Git URL rewrite safety validation where the HTTP extraHeader URL-match probe was being executed against SCP-style SSH effective URLs (e.g., [email protected]:owner/repo), which Git rejects, breaking authenticated private Git dependency installs.

Changes:

  • Skip the HTTP header URL-match probe when the effective URL is not HTTP(S).
  • Improve probe failure diagnostics by including the probe exit status.
  • Add unit regressions covering SCP-style rewrites during authenticated retries and asserting the probe is not spawned for non-HTTP URLs.
File summaries
File Description
src/apm_cli/utils/git_env.py Adds an HTTP(S)-scheme guard before probing --get-urlmatch, and improves probe error messaging.
tests/unit/cache/test_git_env.py Adds regression tests for SCP-style SSH rewrites under injected auth headers and ensures the probe is skipped.
CHANGELOG.md Documents the fix under Unreleased/Fixed.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/apm_cli/utils/git_env.py Resolved
@arnaudoisel

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service terminate

@arnaudoisel

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Arnaud (arnaudoisel) and others added 2 commits September 9, 2026 15:42
The non-HTTP guard added in the previous commit was the first urlsplit
applied to the effective URL, and it is evaluated as an argument to
validate_resolved_git_url_rewrite -- so before that function's
try/except. An insteadOf rule whose replacement carries unbalanced
brackets, such as url."https://[::1/".insteadOf, therefore surfaced a raw
ValueError("Invalid IPv6 URL") instead of the module's
"Unable to verify Git URL rewrite safety", and the CPython message for a
bracketed non-address embeds the host unredacted.

Guarding the scheme lookup cannot fail open: both callers pass the same
URL straight to validate_resolved_git_url_rewrite, which re-splits it
inside its try and raises the wrapped error.
Preserve arnaudoisel's original commits while integrating current main.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel

Daniel Meppiel (danielmeppiel) commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_now

PR #2906 removes a false fail-closed on standard HTTPS-to-SSH Git rewrites while preserving the real credential and rewrite trust boundaries that protect private installs.

cc Arnaud (@arnaudoisel) Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

Panel consensus on the code is clear: no in-scope defect remains on HEAD 221b7debb069e057861b2a50f96bcc4e9918feff. The load-bearing evidence is automated and passed at the exact head. tests/unit/test_transport_selection.py::TestGitConfigInsteadOfResolver::test_real_resolver_allows_https_to_scp_ssh_rewrite proves the reported path now resolves to SSH with assert plan.attempts[0].effective_url == "[email protected]:owner/repo" and assert plan.attempts[0].use_token is False. tests/unit/core/test_public_github_anonymous_first.py::test_public_github_authenticated_retry_drops_header_after_real_ssh_rewrite proves the authenticated retry keeps the rewrite while stripping HTTP auth from the child with assert _git_auth_entries(auth_retry_child) == []. tests/unit/test_transport_selection.py::TestGitConfigInsteadOfResolver::test_real_resolver_checks_http_authorization_for_https_rewrite also preserves the fail-closed HTTPS boundary with with pytest.raises(GitUrlRewriteError, match="different HTTPS origin").

Strategically, this is the right kind of fix for APM: narrow the HTTP header applicability probe to the protocols where Git's URL-match semantics actually apply, keep rewrite validation in the shared owner used by both execution and selection paths, and correct the recovery prose without turning a scoped bug fix into a broad auth redesign. That improves trust on a real private-dependency workflow contributors already use, while keeping the default security posture intact. The changelog entry and both authentication docs are now truthful about the boundary, so community cost is low and communication is explicit.

The only material caution left is outside the code assessment: hosted GitHub workflows are still action_required, so this head is not yet operationally merge-ready. That should be treated as a human authorization and policy gate, not as a reason to reopen the scoped implementation. The earlier test-coverage complaint about missing Scenario Evidence is superseded by the live PR body, which now carries the six-scenario mapping and keeps the governance trail honest about fixture tier and validation scope.

Dissent. No live panel dissent remains. The one residual recommendation from test-coverage was based on an earlier PR body snapshot and is now satisfied by the final Scenario Evidence table already folded into the live description.

Aligned with: Secure by default, Governed by policy, OSS community-driven, Pragmatic as npm

Growth signal. Worth amplifying in release notes as a small but meaningful trust win: private Git installs now honor standard HTTPS-to-SSH insteadOf rewrites without tripping a false safety error, and the docs explain the boundary plainly.

Panel summary

Persona B R N Takeaway
Auth Expert 0 0 0 No auth regression found: the non-HTTP scheme guard preserves HTTPS credential boundaries, real retry behavior, and resolver-level same-host SSH rewrite handling.
CLI Logging Expert 0 0 0 Probe-failure and unsafe-rewrite recovery are now separated cleanly; no CLI logging follow-up in the scoped final diff.
DevX UX Expert 0 0 0 Scoped install-failure UX fix is now accurate, actionable, and mirrored in the user docs; ship.
Doc Writer 0 0 0 No docs fault remains: CHANGELOG and both auth guides now match the HTTP(S)-only probe boundary and probe-failure recovery; ship.
OSS Growth Hacker 0 0 0 This lands as a clean friction-removal fix with truthful changelog/docs support; no OSS-growth follow-up needed before merge.
performance-expert 0 0 0 Ship: src/apm_cli/utils/git_env.py:594-606 adds an O(1) scheme guard that skips one git config probe subprocess on non-HTTP(S) rewrites; no new loops or cache-layer regressions.
Python Architect 0 0 1 Scoped fix preserves the shared rewrite-safety owner and keeps the fail-closed auth boundary intact; ship.
Supply Chain Security 0 0 0 Change narrows the HTTP header probe to HTTP(S), preserves fail-closed rewrite validation and credential boundaries, and adds regression coverage; ship.
Test Coverage 0 1 0 Real Git-backed regression traps cover the SCP rewrite/auth retry fix, but the PR body still lacks the required Scenario Evidence table. The body-only follow-up is now resolved.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Architecture

classDiagram
    direction LR
    class GitEnvUrlRewritePolicy {
      <<IOBoundary>>
      +_validated_git_url_rewrite_policy(remote_url, env, git_dir, worktree)
      +validate_resolved_git_url_rewrite(remote_url, effective_url, has_authorization, managed_auth_intent)
      +_has_applicable_http_authorization(remote_url, headers, env)
      +_urlmatched_header_group(remote_url, headers, env)
    }
    class GitNetworkEnvBuilder {
      <<ProceduralBoundary>>
      +git_network_env(remote_url, overrides, git_dir, worktree)
      +_build_git_auth_fence(transport_url, snapshot, env, intent_snapshot, managed_auth_intent)
    }
    class GitConfigInsteadOfResolver {
      <<Adapter>>
      +resolve(candidate_url) str|None
      +_load_rewrites() tuple[list[tuple], tuple]
    }
    class GitConfigEntry {
      <<ValueObject>>
      +scope str
      +key str
      +value str
    }
    class _GitConfigSnapshot {
      <<ValueObject>>
      +entries tuple[GitConfigEntry,...]
      +rewrites tuple[tuple[str,str],...]
      +http_headers tuple[GitConfigEntry,...]
    }
    class _GitAuthFence {
      <<ValueObject>>
      +remote_url str
      +reset_headers bool
      +suppress_helpers bool
      +safe_headers tuple[str,...]
      +managed_header str|None
    }
    GitConfigInsteadOfResolver ..> GitEnvUrlRewritePolicy : delegates
    GitEnvUrlRewritePolicy ..> GitConfigEntry : inspects
    GitEnvUrlRewritePolicy ..> _GitConfigSnapshot : returns
    GitNetworkEnvBuilder ..> GitEnvUrlRewritePolicy : reuses owner
    GitNetworkEnvBuilder ..> _GitConfigSnapshot : materializes
    GitNetworkEnvBuilder ..> _GitAuthFence : produces
    note for GitEnvUrlRewritePolicy "No OO change in this PR.\nThis procedural boundary remains the canonical owner for rewrite safety and HTTP header applicability."
    note for GitNetworkEnvBuilder "Collect then render:\nvalidate the snapshot, then materialize the child env."
    class GitEnvUrlRewritePolicy:::touched
    classDef touched fill:#fff3b0,stroke:#d47600
Loading

Recommendation

Advisory code stance: ship this change as-is. Do not treat that as a recommendation to merge immediately; first clear the six hosted action_required workflows and whatever maintainer authorization or policy step is blocking them, then merge once those external gates are satisfied.


Full per-persona findings

Python Architect

  • [nit] No architecture follow-up needed.
    Design patterns
  • Used in this PR: Adapter plus dataclass-as-value-object -- GitConfigInsteadOfResolver.resolve() continues to delegate rewrite safety and HTTP header applicability to the shared git_env.py owner, while GitConfigEntry and _GitConfigSnapshot carry validated config facts across callers.
  • Pragmatic suggestion: none -- the current shape is the simplest correct design at this scope.

CLI Logging Expert

No findings.

DevX UX Expert

No findings.

Supply Chain Security

No findings.

OSS Growth Hacker

No findings.

Auth Expert

No findings.

Doc Writer

No findings.

Test Coverage

  • [recommended] Add the required Scenario Evidence table to the PR body.
    This is a behavior-change bug-fix PR, so the PR description should carry the Scenario Evidence table required by .github/skills/pr-description-skill/assets/scenario-evidence-rubric.md. I probed the supplied PR body with rg for 'Scenario Evidence' and found no matching section or table in files/pr-context.json. The code-side regression coverage now looks sufficient by boundary: the added tests run real Git config subprocesses through clone_git_worktree, GitConfigInsteadOfResolver plus TransportSelector, and AuthResolver.try_with_fallback plus git_network_env, and the targeted exact-head nodeids passed locally (11 passed in 2.59s). The remaining gap is governance of that evidence in the PR body, so a maintainer cannot audit scenario-to-test mapping from the description alone.
    Suggested: Add a Scenario Evidence table that names the user-facing SCP rewrite retry scenario, the preserved HTTPS origin rejection controls, the exact test paths/nodeids, and the APM principles each row defends.
    Proof (unknown): (no test ref) -- proves: The PR body maps each user-visible scenario to the automated tests that defend it. [devx,oss]
    rg 'Scenario Evidence' /Users/danielmeppiel/.copilot/session-state/5ccd713d-99fe-4376-871d-d73087091011/files/pr-context.json -> no matches

Performance Expert

No findings. The non-HTTP path avoids the unnecessary probe subprocess.

This panel is advisory. It does not block merge. Re-apply the panel-review label after addressing feedback to re-run.

Reservations carried from strategic-alignment

  • Preserve fail-closed handling of injected HTTP authorization headers and existing trust boundaries; only skip probes in protocols where HTTP headers cannot apply. -- Addressed by the scheme guard and mutation-proven HTTPS origin rejection.
  • Bound repair to transport/probe handling, not broad AuthResolver or credential injection changes. -- Existing owner extended; no auth resolver production changes.
  • Regression must cover real SCP matching rewrite with authenticated retry and preserve no-header, unmatched-rule, ssh:// and HTTPS controls. -- Real Git config fixtures exercise the resolver, selector, child environment, and actual authenticated retry.
  • Legitimate failures should explain probe failure without telling users to remove standard insteadOf config. -- Probe-specific inspection guidance is separate from proven-unsafe rewrite recovery.

Folded in this run

  • Add real Git config resolver, transport selector, and authenticated-retry consumer regressions with SCP/no-header/unmatched/ssh/HTTPS controls. -- 221b7debb0.
  • Separate probe-failure inspection guidance from proven-unsafe rewrite recovery and protect exit-status/redaction diagnostics. -- 221b7debb0.
  • Synchronize Starlight and apm-guide authentication documentation. -- 221b7debb0.
  • Add the six-scenario evidence table and honest validation scope to the PR body for this exact head (metadata-only fold). -- 221b7debb0.

Copilot signals reviewed

  • 3967028719: LEGIT malformed-host wrapping concern, already fixed and thread-resolved by the contributor in 7ab2b0de. The suggested invalid-port example was imprecise; the bracketed-host concern was reproduced. Two fetch rounds, no new inline findings.

Regression-trap evidence

Removing the protocol guard produced five SCP failures (including real resolver and authenticated retry consumers); removing the parser wrapper produced one failure; restoring old diagnostics produced two failures; a blanket header-probe skip produced one HTTPS-origin failure. All mutations were restored.

Local validation

Exact head 221b7debb069e057861b2a50f96bcc4e9918feff: 253 targeted tests passed. All seven local CI lint gates plus architecture boundaries passed after integrating main e38261c5db4d893d6ddebc3925742e4e3bd2ba74.

Version 2 owner evidence detects one owner: Git child-process repository location and URL rewrite safety. Four exact-head functional test IDs cover it; schema validation and strict semantic verification passed. This is an existing-owner extension, not a centralization or authority split.

CI and mergeability

Hosted CI is not green. All six Actions runs for this exact head concluded action_required; the check rollup exposes only the passing CLA. CI run. Maintainer authorization/policy action is required; the exact policy is not established by the API evidence.

PR Head Code stance Iterations Folds Deferrals Copilot rounds CI mergeable mergeStateStatus
#2906 221b7debb0 ship_now 2 4 0 2 action_required MERGEABLE BLOCKED

Convergence

No scoped code follow-up remains. The code advisory is positive, but this PR is not ready to merge until hosted workflows and repository policy are satisfied. No approval, bypass, or merge was performed. This comment replaces the initial advisory rather than adding another panel comment.

Address panel follow-ups on PR microsoft#2906 with real Git config resolver and authenticated-retry regressions, HTTP origin controls, and probe-specific recovery guidance. Preserve unsafe-rule recovery for proven policy failures and synchronize authentication documentation.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator

Docs sync advisory

Verdict: in_place * Pages affected: 2 * LLM calls: 10/15

Summary

Classifier verdict was in_place for docs/src/content/docs/getting-started/authentication.md. The panel found one real drift: the docs did not say that the http.extraHeader URL-match probe only runs for HTTP(S) effective URLs. Verifier checks confirmed that same-host SSH rewrites still remain credential-free and that HTTP(S) safety checks still stand. The verifier also refuted a stronger claim about current CLI wording, so the final docs stay message-agnostic: they tell users to inspect matching rules and retry before removing a rule that may actually be safe.

Applied patches

  • docs/src/content/docs/getting-started/authentication.md
    • Added the missing HTTP(S)-only probe sentence.
    • Clarified that safe same-host SSH rewrites stay credential-free.
    • Reworked troubleshooting toward inspecting matching rules and retrying before removing a rule.
  • packages/apm-guide/.apm/skills/apm-usage/authentication.md
    • Synced the same guidance into the required auth guide resource file.
    • Added the explicit HTTP(S)-only probe note.
    • Kept unsafe-rule removal guidance limited to unsafe or misconfigured rewrites.

Validation

  • Schema validation passed for the classifier artifact and every shared panelist artifact. See docs-schema-validation.json.
  • Verifier findings: 3 total claims, 2 verified, 1 refuted, 0 inconclusive.
  • CDO synthesis: 1 redraft round, then approved the minimal docs-only patch.
  • Final edited files are ASCII-only and limited to the two requested doc paths.

Artifacts

  • docs-classifier.json
  • docs-localizer.json
  • docs-writer-corpus-initial.json
  • docs-writer-guide-initial.json
  • docs-verifier.json
  • docs-writer-corpus-final.json
  • docs-writer-guide-final.json
  • docs-editorial.json
  • docs-growth.json
  • docs-cdo.json
  • docs-schema-validation.json

@TheiLLeniumStudios

Copy link
Copy Markdown

Daniel Meppiel (@danielmeppiel) Sergio Sisternes (@sergio-sisternes-epam) can we please get this reviewed / fixed soon? This is currently a blocker for us to use apm at Electronic Arts. I can help contribute to / provide more details around it if needed to speed things up. Thanks

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Thanks Arnaud (@arnaudoisel) and everyone who supplied the cross-platform and adoption evidence. I have renewed the bounded issue scope on #2898 and have capacity to review this PR. I am the review contact, and we will reuse the existing Git/auth review and documentation work rather than restart implementation or another general panel. Scope approval: #2898 (comment)

The issue is moving to Now. The scope is the HTTP(S)-only applicability probe, with existing rewrite, origin and credential protections retained. Please let us know if your availability for focused follow-ups has changed; no unsolicited rebase or broader auth redesign is requested.

@danielmeppiel

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_now

PR #2906 fixes the authenticated HTTPS-to-SSH probe failure without weakening rewrite validation or credential isolation; all nine specialists report no scoped findings.

cc Arnaud (@arnaudoisel) Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

The panel converges on ship_now for HEAD 221b7debb069e057861b2a50f96bcc4e9918feff. The change extends the existing shared owner: only HTTP-header applicability is skipped for non-HTTP(S) targets; rewrite validation, HTTPS origin protections, credential stripping, and wrapped/redacted diagnostics remain intact. The changelog and both authentication guides match this bounded behavior. No new abstraction, trust exception, or additional release-marketing work is warranted.

The orchestrator's exact-head targeted run reports 193 tests passed in 4.90s. tests/unit/core/test_public_github_anonymous_first.py::test_public_github_authenticated_retry_drops_header_after_real_ssh_rewrite verifies assert _git_auth_entries(auth_retry_child) == []. tests/unit/test_transport_selection.py::TestGitConfigInsteadOfResolver::test_real_resolver_checks_http_authorization_for_https_rewrite retains with pytest.raises(GitUrlRewriteError, match="different HTTPS origin"):. These are real-Git fixture-backed consumer checks, not full installed-CLI private-network proof; diagnostic-status checks are unit-tier. The Scenario Evidence table is present, and the prior malformed-URL concern is resolved.

The latest supplied exact-head observations supersede earlier pending/action-required snapshots: CI, CodeQL, NOTICE, policy, Spec, and Docs workflows completed successfully. CI includes successful Lint, Windows, architecture, both Linux shards, coverage, lifecycle, binary, and self-check jobs. Docs deployment was skipped; CodeQL and eligibility aggregate checks are neutral. No local lint mirror was rerun in this review. Only COMMENTED reviews are recorded, with no completed human code-review approval. GitHub still reports outstanding merge requirements; exact cause not established by this review.

Aligned with: Pragmatic as npm, Secure by default, OSS community-driven

Panel summary

Persona B R N Takeaway
Python Architect 0 0 0 No architectural defects found. The guard extends the existing shared owner; rewrite validation and credential fencing remain intact.
CLI Logging Expert 0 0 0 Probe failures provide redacted status and inspection guidance without falsely declaring rules unsafe. No scoped CLI logging defects found.
DevX UX Expert 0 0 0 No scoped DevX defect found. Standard SSH rewrites avoid false probe failures; actionable inspection guidance and both authentication guides match the bounded behavior.
Supply Chain Security 0 0 0 No in-scope security defect found. Both callers retain rewrite validation; non-HTTP children strip HTTP credentials, HTTPS origin checks remain active, and probe diagnostics stay redacted.
OSS Growth Hacker 0 0 0 Addresses a reported private-install adoption barrier without new setup or trust opt-outs. Existing changelog and authentication guidance suffice; no growth findings.
Auth Expert 0 0 0 No in-scope auth defect found. Same-host SSH drops HTTP credentials; HTTPS origin checks, unsafe-rewrite rejection, and wrapped diagnostics remain intact.
Doc Writer 0 0 0 No scoped documentation defect found. CHANGELOG and both auth guides match the HTTP(S)-only probe, preserved rewrite checks, and inspection-first recovery.
Test Coverage 0 0 0 No scoped gaps; real Git fixtures cover SSH retry, HTTPS and diagnostics; Scenario Evidence met. Orchestrator reports 193 passes at reviewed HEAD; not full CLI/private-network proof.
Performance Expert 0 0 0 No performance concern: URL-length-dependent parsing skips the non-HTTP(S) header probe without new I/O. Existing snapshots and HTTP(S) probing remain intact; no speedup measured.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Architecture

classDiagram
    direction LR
    class TransportSelector {
      +select()
    }
    class InsteadOfResolver {
      <<Protocol>>
      +resolve(candidate_url)
    }
    class GitConfigInsteadOfResolver {
      <<Adapter>>
      +resolve(candidate_url)
    }
    class git_env {
      <<Module>>
      +git_network_env()
      +git_url_has_authorization()
      +validate_resolved_git_url_rewrite()
      _has_applicable_http_authorization()
    }
    class GitConfigEntry {
      <<ValueObject>>
      +scope
      +key
      +value
    }
    class GitUrlRewriteProbeError {
      +category
    }
    TransportSelector o-- InsteadOfResolver : injected resolver
    GitConfigInsteadOfResolver ..|> InsteadOfResolver : structural implementation
    GitConfigInsteadOfResolver ..> git_env : delegates policy
    git_env ..> GitConfigEntry : reads frozen config facts
    git_env ..> GitUrlRewriteProbeError : raises safe diagnostics
    note for git_env "Procedural owner in utils/git_env.py, not a runtime class. No new abstraction."
    class git_env:::touched
    class GitUrlRewriteProbeError:::touched
    classDef touched fill:#fff3b0,stroke:#d47600
Loading
flowchart TD
    A["Private dependency Git operation<br/>utils/git_env.py:git_network_env"] --> B["[EXEC] _validated_git_url_rewrite_policy<br/>_read_effective_git_config"]
    B --> C{"resolve_git_url_rewrite<br/>Matching rule?"}
    C -->|no| J["git_network_env selects transport_url"]
    C -->|yes| D{"_has_applicable_http_authorization<br/>HTTP or HTTPS scheme?"}
    D -->|"no or urlsplit ValueError"| E["Return False; do not probe"]
    D -->|yes| F["Existing direct-header checks<br/>[EXEC when needed] _urlmatched_header_group"]
    F -->|"status 0: evaluate selected headers; 1: none"| V["validate_resolved_git_url_rewrite"]
    F -->|"other status or malformed output"| P["GitUrlRewriteProbeError<br/>Wrapped inspection guidance"]
    E --> V
    V -->|"malformed or unsafe"| X["Wrapped ValueError or GitUrlRewriteError"]
    V -->|accepted| J
    J --> K{"HTTP or HTTPS transport?"}
    K -->|no| L["clear_git_auth_env<br/>clear_git_platform_token_env<br/>retain_auth=False"]
    K -->|yes| M["[EXEC when needed] _build_git_auth_fence"]
    L --> N["_materialize_git_config_snapshot<br/>Retain validated rewrites"]
    M --> N
    N --> R["Revalidate repository-scoped config when present<br/>Return child environment"]
Loading

Recommendation

Recommend the scoped implementation as-is to Daniel Meppiel (@danielmeppiel) for human code review. No additional code or documentation follow-ups are warranted by this panel. This advisory does not replace human code review or determine merge policy.


Full per-persona findings

Python Architect

No findings.

CLI Logging Expert

No findings.

DevX UX Expert

No findings.

Supply Chain Security

No findings.

OSS Growth Hacker

No findings.

Auth Expert

No findings.

Doc Writer

No findings.

Test Coverage

No findings.

Performance Expert

No findings.

This panel is advisory. It does not block merge. Re-apply the panel-review label after addressing feedback to re-run.

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 3623343 into microsoft:main Sep 15, 2026
21 checks passed
Copilot AI mentioned this pull request Sep 15, 2026
2 of 5 tasks
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Sep 18, 2026
…ass (#2893)

* Initial plan

* build(deps): bump setuptools to 83.0.0 in uv lockfile

Co-authored-by: sergio-sisternes-epam <[email protected]>

* Fix skills subset installs for manifestless Git collections (#2891)

* Initial plan

* Fix manifestless skill collection subset resolution

Co-authored-by: danielmeppiel <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: danielmeppiel <[email protected]>

* test: restore complete architecture guard mutation coverage (#2892)

* Initial plan

* test: cover missing architecture owner guard mutations

Co-authored-by: danielmeppiel <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: danielmeppiel <[email protected]>

* fix(registry): exact version selectors must match published build metadata (#2894)

* fix(registry): exact version selectors must match published build metadata

A version selector with no range operator (e.g. 1.0.2+fa163e16) was
routed through semver range matching, which ignores build metadata in
every comparison. Two published builds sharing the same
major.minor.patch (e.g. 1.0.2+fa163e16 and 1.0.2+863e11af) tied under
that comparison, so the resolver could silently return a different
build than the one requested.

Check for an exact string match against the published version list
before falling into range matching. Real ranges (^, ~, >=, wildcards)
are unaffected, since none of them can ever equal a published version
string literally.

Fixes #2877

* test(registry): give each build-metadata test its own matching tarball

Addresses review feedback: the fixture previously reused one tarball
(declared apm.yml version 1.0.2, no build metadata) for both published
VersionEntry builds. Build a distinct tarball per build whose apm.yml
version matches its VersionEntry, and return the right bytes for the
requested version, so the test stays accurate if package validation
later cross-checks the extracted version against the resolved one.

* fix(install): fail loudly when a package deploys to no target (closes #2796) (#2806)

* fix(install): fail target-excluded plugin no-ops

Co-authored-by: Copilot <[email protected]>

* fix: preserve agent plugin recovery refs

Addresses panel follow-ups to keep Agent Plugin target-exclusion recovery commands pinned to the selected ref, document the breaking no-op contract, and add real CLI lifecycle coverage for total no-op failure plus mixed-install success.

Co-authored-by: Copilot <[email protected]>

* test: update plugin target no-op lifecycle

Addresses the CI regression from the legacy exit-0 expectation by rewriting the Agent Plugin non-Copilot target test for issue #2796: a total target-exclusion no-op now fails and commits no durable state.

Co-authored-by: Copilot <[email protected]>

* fix: ground plugin recovery hints in declared skills

Fold #2806 advisory follow-ups: select an inventoried skill directory, quote POSIX command operands, assert mixed-install skill bytes, and document dry-run behavior. Drop release-note duplicates resurrected while incorporating main. Mutation probes reject missing outcome, inventory and quoting guards.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot <[email protected]>

* docs: Add WinGet method installation (#2520)

* docs: Add WinGet method installation

* docs: clarify WinGet installation and upgrades

Address review follow-ups with exact registry selection, prerequisites, separate Windows examples, and matching upgrade guidance. Keep Scoop and the contributor's additive distribution intent.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* chore(deps): bump svgo from 4.0.2 to 4.1.0 in /docs (#2914)

Bumps [svgo](https://github.com/svg/svgo) from 4.0.2 to 4.1.0.
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](svg/svgo@v4.0.2...v4.1.0)

---
updated-dependencies:
- dependency-name: svgo
  dependency-version: 4.1.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): preserve GitLab sparse-fetch transport (#2939)

* fix(deps): preserve GitLab sparse-fetch transport

Execute the shared transport plan using prepared remotes and per-attempt authentication. Gate REST on executed effective HTTPS, isolate live checkout identities, and add real-Git, architecture and mutation regression proof.

Co-authored-by: Copilot App <[email protected]>

* test(spec): bind GitLab sparse fetch to port and cache requirements

Reuse the real-Git transport contract as executable evidence for req-sc-013 and req-rs-016, rather than waiving the Mode B conformance gate.

Co-authored-by: Copilot App <[email protected]>

* docs(spec): regenerate GitLab sparse conformance evidence

Co-authored-by: Copilot App <[email protected]>

* test(deps): align legacy REST fixtures with selected Git attempts

Configure a real strict HTTPS transport plan and a typed Git failure in REST tests, and include the new sparse-plan rule in the frozen architecture inventory.

Co-authored-by: Copilot App <[email protected]>

* fix(deps): fold bounded sparse transport review feedback

Address CEO docs and diagnostics follow-ups on PR #2939: distinguish requested SSH from effective Git rewrites, correct packaged REST guidance, repair fallback recovery advice, and expose admitted protocol switches. Add a warning regression and isolated mutation proof without changing validation auth or other provider policy.

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* test(deps): fold GitLab sparse Copilot regression fixes

Fix both legacy integration REST fixtures to execute a real HTTPS selector plan and raise only typed Git failures. Probe symlink capability rather than skipping Windows unconditionally, and qualify the canonical sparse-fetch credential documentation. Addresses Copilot review 5167472317 without changing validation auth or shared selector dedup semantics.

Co-authored-by: Copilot <[email protected]>

Co-authored-by: Copilot App <[email protected]>

* test(deps): align clone fallback warning regression

CI recovery 1: the shared custom-port warning now correctly explains disabling all fallback configuration sources and points at the live docs route. Update its older clone consumer assertion to this reviewed wording without changing runtime behavior.

Co-authored-by: Copilot <[email protected]>

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* feat(init): onboard existing local packages without rewriting source (#2937)

* feat(init): onboard existing local packages without conversion

Build on the read-only discovery work from #2857 while keeping apply metadata-only. Prove discover, declare, install, rerun, and collision protection through the existing APMLifecycle runner.

Co-authored-by: Ron Izraeli <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* test(onboarding): bind native collision safety to local priority

Cover the existing req-pr-002 local-priority contract with the native-skill collision regression and assert its recorded diagnostic. No normative requirements or specification prose change.

Co-authored-by: Copilot App <[email protected]>

* fix(onboarding): reject existing collisions and report successful targets

Reject conflicting pre-existing dependency slots before applying any manifest delta. Report native skill metadata from the first successful target, preserving skipped author-owned destinations. Refresh owned-collision fixtures and the architecture rule inventory.

Co-authored-by: Copilot App <[email protected]>

* fix(onboarding): preserve global handoff and discovery boundaries

Addresses scoped panel follow-ups: preserve user scope in the separate install hint, document declined consent, and defend the existing init discovery facade and target-selection boundary without expanding admission or installation behavior.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Ron Izraeli <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* chore(deps): bump astro from 7.2.7 to 7.3.2 in /docs (#2922)

Bumps [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) from 7.2.7 to 7.3.2.
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/[email protected]/packages/astro)

---
updated-dependencies:
- dependency-name: astro
  dependency-version: 7.3.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump smol-toml from 1.6.1 to 1.8.0 in /docs (#2942)

Bumps [smol-toml](https://github.com/squirrelchat/smol-toml) from 1.6.1 to 1.8.0.
- [Release notes](https://github.com/squirrelchat/smol-toml/releases)
- [Commits](squirrelchat/smol-toml@v1.6.1...v1.8.0)

---
updated-dependencies:
- dependency-name: smol-toml
  dependency-version: 1.8.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: establish issue-first contribution and governance policy (#2954)

* docs: establish issue-first contribution and governance policy

Implement the approved Phase 1 scope in #2953. Separate human scope approval from automated recommendations, document the maintainer roster and progression, and preserve technical reference material in the development guide. Live automation and backlog migration remain later phases.

Co-authored-by: Copilot App <[email protected]>

* docs: fix rendered OpenAPM specification link

Use Astro's openapm-v01 route rather than the source filename spelling. Fix the broken link reported by the Deploy Docs workflow for #2954.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* fix(triage): make automated recommendations advisory (#2956)

* docs: establish issue-first contribution and governance policy

Implement the approved Phase 1 scope in #2953. Separate human scope approval from automated recommendations, document the maintainer roster and progression, and preserve technical reference material in the development guide. Live automation and backlog migration remain later phases.

Co-authored-by: Copilot App <[email protected]>

* docs: fix rendered OpenAPM specification link

Use Astro's openapm-v01 route rather than the source filename spelling. Fix the broken link reported by the Deploy Docs workflow for #2954.

Co-authored-by: Copilot App <[email protected]>

* fix(triage): make automated recommendations advisory

Constrain workflow outputs to classification and processing metadata, retain legacy deduplication, and preserve human scope approval in direct consumers.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* docs: define issue-backed roadmap and release planning (#2959)

* docs: establish issue-first contribution and governance policy

Implement the approved Phase 1 scope in #2953. Separate human scope approval from automated recommendations, document the maintainer roster and progression, and preserve technical reference material in the development guide. Live automation and backlog migration remain later phases.

Co-authored-by: Copilot App <[email protected]>

* docs: fix rendered OpenAPM specification link

Use Astro's openapm-v01 route rather than the source filename spelling. Fix the broken link reported by the Deploy Docs workflow for #2954.

Co-authored-by: Copilot App <[email protected]>

* fix(triage): make automated recommendations advisory

Constrain workflow outputs to classification and processing metadata, retain legacy deduplication, and preserve human scope approval in direct consumers.

Co-authored-by: Copilot App <[email protected]>

* docs: define issue-backed roadmap and release planning

Closes #2958. Document the approved planning model; live Project rollout remains separately gated.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* fix(governance): require human scope and add neutral eligibility evidence (#2964)

* fix(governance): require human scope and add neutral eligibility evidence

Refs #2960. Keep implementation authority human, make daily docs discovery-only, and deploy compatible triage consumers with regression coverage.

Co-authored-by: Copilot App <[email protected]>

* fix(governance): make workflow trust and manual scope boundaries explicit

Use a verified literal default-branch checkout and bind policy to its actual commit. Remove remaining docs workflow label-ratification instructions; keep companion work outside unattended runs.

Co-authored-by: Copilot App <[email protected]>

* fix: harden governance event and child-wave boundaries

Address the six bounded review contracts: default-branch entrypoints, fresh child-wave confirmation, trusted gh resolution, complete approval records, visible references, and bounded metadata reads.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* fix(git-env): skip the HTTP header probe for non-HTTP effective URLs (#2906)

* fix(git-env): skip the HTTP header probe for non-HTTP effective URLs

An `insteadOf` rule that rewrites the fetched HTTPS URL to SSH, such as
`url."[email protected]:".insteadOf = https://github.com/`, made every private
dependency download fail on the authenticated retry.

`_validated_git_url_rewrite_policy` asked whether an HTTP `extraHeader`
applied to the effective URL. With an SCP-style target that probe ran
`git config --get-urlmatch http.extraHeader [email protected]:owner/repo`,
which git rejects with `invalid URL scheme name or missing '://' suffix`
and exit status 128, so the probe raised `GitUrlRewriteProbeError`.

An HTTP header can never reach a non-HTTP transport, so the answer is
already known: report no authorization and do not spawn the probe. The
remaining non-zero branch now names the exit status instead of only
saying the probe failed.

Fixes #2898

* docs(changelog): reference the pull request number

* fix(git-env): keep malformed rewrite targets on the wrapped safety error

The non-HTTP guard added in the previous commit was the first urlsplit
applied to the effective URL, and it is evaluated as an argument to
validate_resolved_git_url_rewrite -- so before that function's
try/except. An insteadOf rule whose replacement carries unbalanced
brackets, such as url."https://[::1/".insteadOf, therefore surfaced a raw
ValueError("Invalid IPv6 URL") instead of the module's
"Unable to verify Git URL rewrite safety", and the CPython message for a
bracketed non-address embeds the host unredacted.

Guarding the scheme lookup cannot fail open: both callers pass the same
URL straight to validate_resolved_git_url_rewrite, which re-splits it
inside its try and raises the wrapped error.

* fix: complete SCP rewrite consumer coverage and recovery

Address panel follow-ups on PR #2906 with real Git config resolver and authenticated-retry regressions, HTTP origin controls, and probe-specific recovery guidance. Preserve unsafe-rule recovery for proven policy failures and synchronize authentication documentation.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* docs: publish the active issue-backed roadmap (#2988)

Publish Project 2304 from the README and contribution entry points, replace pending-rollout prose, and preserve issue-owned scope and milestone-owned release planning.

Refs #2960

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* fix(uninstall): preserve unmanaged skills with an empty inventory (#2947)

* fix(uninstall): preserve unmanaged skills with an empty inventory

* docs(changelog): link unmanaged skill cleanup fix

* test(ci): repair stale daily release smoke fixtures (#2987)

Cover the two registered owner guards, exercise GitLab REST through real transport selection, and align Windows fixtures with canonical home/path and deployed-file hash contracts. Preserve production behavior and strengthen regression witnesses for #2965.

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* fix(cache): pin core.autocrlf=false on GitCache checkouts (#2982)

* fix(cache): pin core.autocrlf=false on GitCache checkouts (closes #2971)

Git-subpath materialization went through GitCache without the
CRLF pin that bare_cache already set, so Windows hosts with
system core.autocrlf=true recorded non-portable content_hash
values. Add a -c pin that outranks env-frozen host config,
persist it on the checkout, and rematerialize unpinned shards.

Co-authored-by: Copilot App <[email protected]>

* docs(changelog): cite #2982 for GitCache autocrlf pin

Co-authored-by: Copilot App <[email protected]>

* fix(cache): heal GitCache autocrlf pin under shard lock

Defer unpinned SHA-valid eviction until _create_checkout holds the
shard lock, parse the local core.autocrlf key, fail closed on land
races, and document legacy lockfile regeneration.

Co-authored-by: Copilot App <[email protected]>

* test(cache): isolate autocrlf host fixture and fail closed

Drop inherited GIT_CONFIG_NOSYSTEM/PARAMETERS before the hostile-host
regression, assert system autocrlf=true, document lock --update recovery,
and reject unremovable unpinned shards.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Copilot App <[email protected]>

* chore: release v0.31.0 (#2989)

Bump pyproject.toml and the apm-cli uv.lock entry to 0.31.0, and curate the dated changelog for the minor release. Current CI lint mirror passes locally; dependency versions, public registry URLs, and hashes remain unchanged.

Post-merge: tag v0.31.0 to trigger the release workflow.

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* feat(autopilot): origin-aware skills with CODEOWNERS-safe review (#3003)

* feat: add ORIGIN x INTENT autopilot for triage, delivery, and review

Replay the actor-aware autopilot surface onto origin/main as one
commit: unattended runs never assign; actor-session delivery assigns
the working user; standalone review requests that user as reviewer.
Schedulers own the queue scripts and fan-out; workers advise or
implement one item. Keep CODEOWNERS additive and require full
conversation context before new advice.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): align tags and delivery with human-scope governance

Keep triage/requested as the only request trigger. status/needs-triage
stays human state. Delivery still queues on status/accepted, then probes
scripts/governance/eligibility.cjs and requires fresh confirmation.
Unattended ORIGIN never implements.

Co-authored-by: Copilot App <[email protected]>

* refactor(autopilot): turn monolith orchestrators into sequencing aliases

apm-issue-autopilot and batch-bug-shepherd no longer implement. They
dispatch the canonical schedulers in-session, with a hard stop so
triage advice is not implementation permission.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): treat FANOUT_LIMIT as concurrency, not batch size

Schedulers must persist and drain the full helper-selected list,
refilling a slot when it returns. Two slots is parallelism only.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): stop spam-skipping bug forms; workers own writes

Sweep markup strip no longer lets a heading eat the rest of the
body, so valid GitHub bug forms stay eligible. Issue and PR triage
workers own comments and processing labels; schedulers only queue
and fan out.

Co-authored-by: Copilot App <[email protected]>

* feat(autopilot): add worker activation card with optional writes

Issue-triage worker declares activation_card: on. Writes default
on; write: off returns the template without commenting or labeling.

Co-authored-by: Copilot App <[email protected]>

* feat(autopilot): move PR-review writes off the scheduler

PR-review scheduler only queues and fans out. Reviewing sessions own
comments, labels, and the actor-session @me reviewer request. The
composed worker gets an activation card with write default on.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): gate PR review on panel-review

Unfiltered open-PR listing queued every pull request. Fresh review
now requires the panel-review label or an explicit named list.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): require status/accepted before PR review

panel-review only requests a pass. Without status/accepted on the PR
or a linked issue, the reviewing session comments, clears the request
label, and stops.

Co-authored-by: Copilot App <[email protected]>

* refactor(autopilot): rename review panel; silent unaccepted stop

Rename apm-review-panel to autopilot-pr-review-panel and keep the
old name as a compatibility alias. Scheduler, worker, and panel all
stop when status/accepted is missing. Scheduler and worker leave no
comment; panel/worker may clear panel-review.

Co-authored-by: Copilot App <[email protected]>

* refactor(autopilot): review-worker is advisory; merge-worker is drive-to-merge

Keep autopilot-pr-review-scheduler advisory-only. It composes
autopilot-pr-review-worker and never spawn autopilot-pr-merge-worker.
Summon merge-worker by name. Old panel names stay aliases.

Co-authored-by: Copilot App <[email protected]>

* feat(autopilot): require Autogenesis activation cards on canonical skills

Enter before work, Exit after. Do not load Autogenesis path modules.
Schedulers are write off; workers default write on.

Co-authored-by: Copilot App <[email protected]>

* refactor(autopilot): drop Autogenesis wording from activation cards

Keep Enter/Exit cards. Do not name the source discipline.

Co-authored-by: Copilot App <[email protected]>

* feat(autopilot): declare activation_card on for every autopilot skill

Aliases and canonical skills both set the flag. Canonical skills still
own the Enter/Exit card body.

Co-authored-by: Copilot App <[email protected]>

* docs: add maintainer map for autopilot skills

Internal package map only. Not product documentation.

Co-authored-by: Copilot App <[email protected]>

* refactor(autopilot): nest skill packages under packages/autopilot

Keep leaf package names. Move the maintainer map to
packages/autopilot/README.md. Point pr-description-skill deps up one
more directory. Leave .agents/skills/ deploy layout flat.

Co-authored-by: Copilot App <[email protected]>

* feat(autopilot): require scheduler queue tables with labels

Schedulers must emit keep-set and drop-set rows (number, kind,
labels, rationale, slot) before any spawn.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): invocation is harness, not origin

Copilot App, local, Cloud, and Remote Agent fill actor-session.
agentic-workflow is only gh-aw / Actions.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): exclude completed-advice from triage sweeps

Sweep fetch skips triage/recommended and status/triaged at GitHub
so already-advised open issues and PRs are not re-listed. Do not
write status/triaged. Named requests still fetch the one item.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): name worker sessions Domain stage #n

Issue triage #2993, PR triage #1017, Issue delivery #2902,
PR review #2741. No GitHub title. Do not rename in-flight sessions.

Co-authored-by: Copilot App <[email protected]>

* Keep issue-triage JSON internal, not on GitHub comments.

The public advisory is prose plus the HTML receipt. Workers still fill
schema_version 2 JSON for the parent Exit, not the issue thread.

Co-authored-by: Copilot App <[email protected]>

* Make triage JSON receipts optional, default off.

Enter/Exit cards take json: off|on. Omitted or unknown is off, not a
missing-field stop. json: on stays an internal payload; GitHub comments
stay prose.

Co-authored-by: Copilot App <[email protected]>

* Stop the Triage Panel AW from requiring a JSON comment tail.

Pass json: off into autopilot-issue-triage-worker. GitHub comments stay
prose plus the HTML receipt.

Co-authored-by: Copilot App <[email protected]>

* Route the PR Review Panel AW through the review scheduler.

Load autopilot-pr-review-scheduler (write off) then run
autopilot-pr-review-worker in-thread. Do not compose the merge worker.

Co-authored-by: Copilot App <[email protected]>

* Auto-defer PRs with no accepted issue and thank the author.

PR triage writes status/deferred unless a same-repo linked issue is
status/accepted, and asks the author to open an issue first.

Co-authored-by: Copilot App <[email protected]>

* Queue accepted PRs for advisory review without a named list.

Unsteered PR review now unions panel-review with status/accepted on
the PR, then still applies the accepted gate and CODEOWNERS
last-comment conditions. Named list is not required when a
maintainer already accepted the PR.

Co-authored-by: Copilot App <[email protected]>

* Deliver accepted issues even when the author is a bot.

status/accepted from a CODEOWNER is the queue gate. Author type
is not a drop reason.

Co-authored-by: Copilot App <[email protected]>

* Remove autopilot compatibility alias stubs.

Keep the nine canonical autopilot-{domain}-{stage}-{role} packages.
Drop the 22 installable aliases, retarget tests to merge-worker and
delivery, and refresh the lockfile.

Co-authored-by: Copilot App <[email protected]>

* docs: retarget leftover alias names to canonical autopilot skills

PRINCIPLES.md, delivery/merge worker assets, and the cut-release
eval note now name autopilot-{domain}-{stage}-{role} only. Historical
CHANGELOG entries stay as written.

Co-authored-by: Copilot App <[email protected]>

* style: ruff-format autopilot unit tests after main merge

Co-authored-by: Copilot App <[email protected]>

* chore: refresh lock deployment hashes after alias-name retarget

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): align review sweep, auto-defer, and lock orphans

Copilot App queue-open now unions panel-review with status/accepted on
the PR. PR triage auto-defers only when neither the PR nor a linked
issue is accepted. Drop deleted alias packages from the lockfile and
retarget merge-worker eval fixtures.

Co-authored-by: Copilot App <[email protected]>

* fix(lock): rewrite deployed test-coverage-expert instruction link

Install replay retargets the relative markdown link from
.github/agents to .apm/instructions. The committed copy still used
the source-relative path, which failed APM Self-Check drift.

Co-authored-by: Copilot App <[email protected]>

* fix(autopilot): sole-assignee claim and trusted gh lookup

Actor-session delivery continues only when @me is the sole human
assignee after add, and re-checks before implement or PR. Triage
queue helpers resolve gh through get_gh_executable so a
project-controlled binary is never used.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Copilot App <[email protected]>

* perf(cli): lazy-load heavyweight command modules (#3001)

* perf(cli): lazy-load heavyweight command modules

Defer install, audit, pack, marketplace, uninstall, update, and prune
until the matching verb is dispatched so apm --help, apm doctor, and
apm config get no longer import those graphs.

Closes #2996

Co-authored-by: Copilot App <[email protected]>

* docs(changelog): link lazy CLI dispatch to #3001

Co-authored-by: Copilot App <[email protected]>

* fix(cli): freeze lazy verbs and keep completion light

PyInstaller cannot follow importlib string paths, so collect
apm_cli.commands into hiddenimports. Complete from stubs, match
stub short_help to the real command, and advertise doctor --help.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Daniel Meppiel <[email protected]>

* fix(alias): reject path-traversing dependency aliases — fixes #2900 (#2901)

* fix(alias): reject path-traversing dependency aliases

Aliases were only matched against a lax character regex, letting values
like "..", "./x", or "foo/../bar" escape apm_modules at download and
integrate time. Now validating every parsed alias through
path_security's
segment checks and guarding the resolved install path inside the
download/integrate phases. Adds unit coverage for traversal and safe
aliases.

* fix(alias): surface friendly error for traversal aliases

Wrap validate_path_segments in parse_alias_override so '.'/'..' aliases
translate PathTraversalError into the existing allowed-character message
instead of leaking a low-level technical error. Strengthen traversal
tests
to assert the friendly message.

* test(alias): prove install-phase symlink escape is blocked

A valid alias like 'safe-name' passes parse-time validation, but
apm_modules_dir/safe-name can itself be a symlink pointing outside
apm_modules_dir. ensure_path_within is the only guard that resolves
symlinks before containment (download.py:65, integrate.py:622); this
test proves the escape raises PathTraversalError and never writes
outside the managed tree.

* test(alias): trap ensure_path_within guards end-to-end at install tier

The parser rejects traversal aliases (parse_alias_override), and the
ensure_path_within containment guards exist at download.py:65 and
integrate.py:622 as the defense-in-depth last line. But no test drove
those
guards through the real phase entry points -- the PR "Scenario 4" claim
(install path can never escape apm_modules even if the parser is
bypassed)
was proven only at unit tier.

Add install-tier regression traps that route malicious aliases through
the
actual phase run() functions:

- tests/red_team/install/test_alias_path_escape.py
  * download.run() rejects a '..' traversal alias and a symlink that
    resolves outside apm_modules_dir via PathTraversalError, asserting
    no
    download bytes land.
  * integrate.run() rejects the same two vectors before materialization.
  * Safe-alias controls confirm no false positive.

- tests/unit/test_registry_entry_alias_traversal.py
  * Covers the secondary parse_registry_object_entry alias validation
    (registry_entry.py:86): regex layer (%2e%2e) and
    validate_path_segments
    layer ('..', 'pkg/..'), plus a safe-alias affirmative control.

* Refactor install path handling for dependencies

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* fix(alias): centralize safe destinations without restricting sources

Address the PR #2901 panel and Copilot follow-ups: route all alias ingress and materialization through existing owners, reject root-equal destinations, preserve local sibling sources, and defend real reinstall metadata and hashes with regression and architecture tests. Include actionable diagnostics and migration guidance.

Co-authored-by: Copilot App <[email protected]>

* fix(alias): preserve normalized roots and legacy cache preflight

Address round-two architecture/security and lifecycle findings. Compare both roots through path_security, give safe alias recovery guidance, and preserve existing legacy-plugin validation before alias-aware resolution can normalize cached files. Main passes the legacy missing-metadata cases; added preflight keeps that behavior. Windows prefix and legacy-preflight mutation controls fail with guards removed.

Co-authored-by: Copilot App <[email protected]>

* fix(alias): preserve remote source anchors and cache replacement

Keep authenticated remote coordinates separate from flat aliases. Inject the existing read-only legacy cache admission at actual reuse after canonical fetch decisions, not preparation; retain same-ref failure and transactional replacement. Extend real resolver and CLI lifecycle contracts with aliased remote siblings and invalid-cache ref changes. Mutation controls detect both source-anchor regression and misplaced or missing admission.

Co-authored-by: Copilot App <[email protected]>

* fix(alias): preserve placement and current ref replay after install

Continue the existing PR #2901 CI recovery without resetting its run. Preserve the recovered implementation and review folds: durable alias projection, contained alias scanning, specification conformance, and current-remote ref observations after successful checkout. Original contributor and follow-up commits remain in the lineage.

Co-authored-by: Copilot App <[email protected]>

* test(cache): exercise stale bare fallback under corrupt receipts

The mutation gate showed the previous fixture passed even when receipt handling was removed because no bare-cache directory existed. Materialize the canonical shard directory so the stale-ref fallback is reachable and the regression fails without the receipt guard. Production code is unchanged.

Co-authored-by: Copilot App <[email protected]>

* test(lockfile): declare absent alias in dev dependency fixtures

Continue CI recovery2 after Linux shard2 exposed four generic Mock dependency references whose undeclared alias attribute became another Mock. Model the real unaliased DependencyReference default explicitly instead of weakening production alias validation.

Co-authored-by: Copilot App <[email protected]>

* fix(spec): preserve published alias schema identities

Keep existing public v0.1 schemas byte-identical and select independent v0.1.41 schemas for alias validation. Accept the new exact manifest ID through the existing contract owner while retaining old-ID compatibility and fail-closed unknowns.

Co-authored-by: Copilot App <[email protected]>

* fix(alias): clarify compatibility and recovery after main integration

Fold specification editorial fixes, keep the unshipped security note under Unreleased, document schema opt-in compatibility, and defend actionable diagnostics with regression assertions.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* fix(ci): repair advisory locks and platform regressions (#3021)

* fix(ci): repair advisory locks and platform regressions

Regenerate advisory workflow metadata without changing runtime pins. Preserve root-local discovery scope during scratch drift replay and make the Windows alias fixture assert the on-disk directory name. Add source-freshness and replay regression coverage.

Co-authored-by: Copilot App <[email protected]>

* fix(ci): honor pinned workflow compiler and harden regression fixtures

Recompile PR review with gh-aw v0.87.8 and verify the generated banner against the repository pin. Set explicit package deployment defaults and assert resolver initialization, isolate symlink-only prerequisites, and prove workflow hashes normalize LF, CRLF, and CR input.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>

* chore(deps): bump gitpython from 3.1.58 to 3.1.59 (#2921)

Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.58 to 3.1.59.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](gitpython-developers/GitPython@3.1.58...3.1.59)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-version: 3.1.59
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump js-yaml from 4.3.1 to 4.3.2 in /docs (#2920)

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.3.1...4.3.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump devalue from 5.8.1 to 5.9.2 in /docs (#3019)

Bumps [devalue](https://github.com/sveltejs/devalue) from 5.8.1 to 5.9.2.
- [Release notes](https://github.com/sveltejs/devalue/releases)
- [Changelog](https://github.com/sveltejs/devalue/blob/main/CHANGELOG.md)
- [Commits](sveltejs/devalue@v5.8.1...v5.9.2)

---
updated-dependencies:
- dependency-name: devalue
  dependency-version: 5.9.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(build): support setuptools 83 in binary packaging

Require PyInstaller 6.17.0 and lock its minimum compatible hooks to avoid altgraph importing the removed pkg_resources module. Preserve the setuptools 83.0.0 security upgrade.

Co-authored-by: Copilot App <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: sergio-sisternes-epam <[email protected]>
Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Nadav Yogev <[email protected]>
Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Gijs Reijn <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ron Izraeli <[email protected]>
Co-authored-by: Arnaud <[email protected]>
Co-authored-by: Marco Frömbgen <[email protected]>
Co-authored-by: Sergio Sisternes <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
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.

[BUG] insteadOf rewrite matching the fetched URL blocks private installs since 0.30.0

4 participants