fix(ci): repair stale daily release smoke fixtures - #2987
Conversation
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: Copilot App <223556219+Copilot@users.noreply.github.com>
Docs sync advisoryVerdict: no_change * Pages affected: 0 * LLM calls: 0/15 The schema-validated L0 path gate matches all five changed files to tests/** or docs/** and no user-surface path. No CLI, configuration, authentication, or package format contract changes. The PR already adds directly useful portability guidance to the contributor integration-testing page; no downstream corpus edits are needed. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were reported.
Review tier: Lite
Findings: None
What changed in this PR
Repairs stale CI smoke-test fixtures for issue #2965 without changing production behavior.
Changes:
- Adds missing architecture-owner mutation coverage.
- Repairs GitLab, Windows, and content-hash fixtures.
- Documents portable fixture guidance.
| File | Summary |
|---|---|
tests/unit/test_triage_advisory.py |
Verifies canonical hashes and CRLF invariance. |
tests/unit/adopt/test_onboarding.py |
Aligns Windows home and path expectations. |
tests/integration/test_download_copilot_end_to_end.py |
Uses real transport/auth selection with mocked I/O. |
tests/integration/test_architecture_owner_rule_mutations.py |
Adds coverage for two registered guards. |
docs/src/content/docs/contributing/integration-testing.md |
Documents portable fixture practices. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Hosted validation completed on commit 5e0eda1: native This is PR-time Windows/Linux evidence, not a full daily promotion rerun. The previously cancelled daily Linux x86 integration corpus remains unproven, and the full ARM/macOS promotion paths have not been rerun on this commit. No fixes beyond the original scoped commit were needed. PR remains open; nothing was merged or closed. |
fix(ci): repair stale daily release smoke fixtures
TL;DR
Repair the eight reported #2965 failures with changes to four test modules and a short contributor fixture note. The failures come from missing mutation cases, an obsolete GitLab mock, and Windows fixture expectations that disagree with existing production contracts. No production code, auth policy, workflow, recorded digest, or coverage threshold changes.
Important
Addresses #2965; retain the issue for a complete daily rerun. Local evidence is macOS only. The reported Linux x86 integration job was cancelled, not passed.
Problem (WHY)
Scheduled run 34927682097 and current main both use
6f3dd393ce82e4aa3b56d0de292836590af2d59e.contracts-tooling-governance-evidenceandonboarding-metadata-only.Path.home()disagree with Windowsexpanduser, producing a false install-identity collision.The repair follows the verified-execution loop: "do the work, run a validator (a script, a reference checklist, or a self-check), fix any issues, and repeat until validation passes." Failure logs and mutation witnesses, not relaxed assertions, determine the scope.
Approach (WHAT)
compute_file_hash, retaining exact installed/source equality and unchanged recorded digests. Add CRLF and content-tamper witnesses.Implementation (HOW)
tests/integration/test_architecture_owner_rule_mutations.pytests/integration/test_download_copilot_end_to_end.pytests/unit/adopt/test_onboarding.pywindows_compat. Exercise Windows home-expansion semantics on every OS.tests/unit/test_triage_advisory.pywindows_compat.docs/src/content/docs/contributing/integration-testing.mdDiagram
The highlighted fixture now reaches the existing GitLab REST behavior through a real, authorized transport attempt.
sequenceDiagram participant T as TestDownloadGitlabFile participant D as DownloadDelegate participant P as TransportSelector and AuthResolver participant G as Mock sparse Git I/O participant R as Mock REST I/O rect rgb(255, 247, 200) Note over T,P: Updated fixture uses real owners and isolated dummy credentials T->>D: download_gitlab_file with explicit HTTPS D->>P: Select and authenticate the Git attempt P-->>D: Same-origin HTTPS attempt D->>G: fetch_file G-->>D: GitFileTransportError end D->>D: Check same-origin HTTPS REST eligibility D->>R: Request file with scoped headers R-->>T: Payload or existing authentication error Note over T,R: Assert payload, fallback ref, callback and failure without production changesTrade-offs
windows_compatgate and full integration selection. No new CI job, framework, skip, threshold change, or assertion deletion.Benefits
Validation
Before: current-main matrix reproduction:
1 failed, 67 passed in 3.67s; separate GitLab reproduction: all four reported tests failed with the same empty-plan/REST-unauthorized errors as the daily run.After, local macOS: complete touched modules plus
tests/unit/deps/test_gitlab_sparse_transport_contract.pyandtests/unit/test_content_hash.py:Final GitLab/global-discovery/triage rerun after strengthening URL and Windows-home assertions:
CI taxonomy/quality/ratchet contract selection:
Regression witnesses and lint evidence
In-memory mutation experiments (no production file edits):
Canonical lint was rerun after refreshing/merging main, before commit/push: Ruff, format, pylint R0801, auth and architecture boundaries passed. The YAML/2100-line/relative-path guards also passed using equivalent Python regex checks because macOS grep lacks
-P.mmdcvalidated the diagram. Docs-sync's schema-validated L0 result isno_change: tests and contributor guidance only.Scenario evidence
tests/unit/adopt/test_onboarding.py::test_global_home_reference_deduplicatesand::test_global_uses_existing_user_manifest_and_absolute_refstests/integration/test_download_copilot_end_to_end.py::TestDownloadGitlabFile; adjacenttests/unit/deps/test_gitlab_sparse_transport_contract.pytests/unit/test_triage_advisory.py::test_installed_skill_files_and_recorded_hashes_match_sourcestests/integration/test_architecture_owner_rule_mutations.pyWarning
The original failures are checkout unit/integration failures, not proof of a broken published artifact. Separate release-validation jobs in that run passed, but macOS ARM did not reach its later validation and Linux x86 integration was cancelled. This PR does not claim complete hosted or release-smoke success.
How to test
uv run --frozen --extra dev pytest -q tests/integration/test_architecture_owner_rule_mutations.py tests/integration/test_download_copilot_end_to_end.py tests/unit/adopt/test_onboarding.py tests/unit/test_triage_advisory.py tests/unit/deps/test_gitlab_sparse_transport_contract.py tests/unit/test_content_hash.py; expect all 651 cases to pass.uv run --frozen --extra dev pytest -q -m windows_compat tests/unit/adopt/test_onboarding.py tests/unit/test_triage_advisory.py; expect exactly three selected cases to pass, including native Windows CI.Review contact: Daniel Meppiel (@danielmeppiel). Bounded scope is recorded in the issue artifact; no independent approval, merge, or release is claimed.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Fixes: #2965