Repository navigation
ci(windows): add exact packaged qualification rehearsal - #3148
Conversation
|
Warning Review limit reached
Next review available in: 55 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Summary by CodeRabbit
WalkthroughThe PR adds a manually triggered Windows workflow that validates an exact candidate, tests packaged CLI and VSIX behavior, records evidence, and uploads receipts. It also adds policy and documentation, plus configurable VS Code test-server selection with regression coverage. ChangesWindows packaged qualification
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Maintainer
participant QualificationWorkflow
participant CandidateRepository
participant PackagedCLI
participant VSCodeJourney
participant ActionsArtifacts
Maintainer->>QualificationWorkflow: dispatch candidate SHA and ref
QualificationWorkflow->>CandidateRepository: checkout and validate identity
QualificationWorkflow->>PackagedCLI: package, install, and run CLI journeys
QualificationWorkflow->>VSCodeJourney: package VSIX and run trusted/untrusted journeys
QualificationWorkflow->>ActionsArtifacts: write and upload qualification receipts
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Exact-head self-review (a93124a): inspected the complete workflow, policy, docs, and static contract test. Semantic owners are the workflow for candidate/package identity and hosted journeys, policy for forbidden publication/secrets and receipt transport, and existing VS Code test harness for trusted/untrusted lifecycle behavior. Local proof: actionlint PASS; cargo fmt --all -- --check PASS; git diff --check PASS; cargo test -p xtask packaged_qualification -- --nocapture PASS (1 test). The five-minute cargo xtask check-workflows attempt timed out under shared Windows/Cargo load, so it is unavailable, not pass. Hosted Windows execution cannot be dispatched until this workflow exists on the default branch; no release/publication claim is made. Disposition: REVIEW_INCOMPLETE pending hosted exact-candidate receipts and independent substantive review. |
There was a problem hiding this comment.
Confirmed findings
- Working-directory is
editors/vscodefor npm and test:e2e steps, but absolute paths back to $env:QUAL_ROOT are constructed; on Windows long-path / junction substitution the resolved QUAL_ROOT could diverge from the string-prefix check that guards the installed binary. Use (Resolve-Path -LiteralPath $env:QUAL_ROOT).Path consistently for both the prefix and the resolved binary before comparison, and document junction-symlink refusal. - No Rust memory/lifetime/ownership surface is changed by this diff. The only Rust delta is a text-grep unit test. Native/unsafe-review coverage is zero new gaps. Lane finds nothing actionable; residual risk is the pwsh orphan-process matcher (process-lifetime, not UB) and lives in workflow scope.
- Sibling scan was narrow: only the new workflow + xtask test + docs index were inspected. Other places that may enumerate CI lanes (docs/handoffs, sibling advisory docs, sibling release notes) were not scanned; do not claim broad coverage.
- Workflow_dispatch is unauthenticated for callers with write access; concurrency key is candidate_sha so same SHA re-runs do not cancel, but two distinct dispatchers can race on the same SHA and produce overlapping receipts. Acceptable for advisory rehearsal.
- No JavaScript/TypeScript memory, async, detach, or transferable boundary is changed in this PR. The editor journeys execute pre-existing npm scripts and assert orphan-process cleanup via WMI; any lifetime/queue/transfer issues live in the editor test harness, not this diff. Lane explicitly notes no RIGHT-side JS memory primitives were added.
- Concurrency group
windows-packaged-qualification-${{ inputs.candidate_sha }}correctly serializes per-SHA but does not serialize across distinct SHAs that share the same cargo cache namespace on the runner; combined withcancel-in-progress: falsethis can leave staletarget/ripr/windows-packaged-qualificationartifacts across runs. Smallest fix: include runner/job identifier in the path or wipe QUAL_ROOT at start. - ub-active-view surface is absent in this diff. The only Rust change is the include_str!() static contract test in xtask/src/windows_advisory.rs; it contains no span/length/ArrayBuffer/TypedArray interactions. The workflow's pwsh steps read files via Get-FileHash and tar -tf, neither of which mutates a Node-side ArrayBuffer or backing store. No right-side changed or surrounding context line introduces a view/resize/detach concern.
Verification questions
- Confirm cargo-test sensor is receipt-absent (scheduled-late) but the workflow under review itself runs cargo package/install on windows-latest with no in-PR test execution proof; this PR only ships a rehearsal lane, not a receipt of it running.
- Confirm xtask test uses substring assertions on raw YAML; misses structural drift (e.g., actions/checkout tag bump dropping v6, upload-artifact v7 removal, missing persist-credentials) and gives false confidence.
- Confirm process cleanup check uses Where-Object on CommandLine like $env:QUAL_ROOT and matches Name regex 'ripr|Code|electron'; time-of-check-to-time-of-use gap between test:e2e exit and CimInstance enumeration plus VS Code / Electron child process naming may miss spawned children whose CommandLine has not yet propagated, and match is permissive on 'Code' which can hit unrelated MS Code-installed processes if QUAL_ROOT partially overlaps.
Test proof
- Focused HEAD proof failed (exit 101):
cargo test --locked --package xtask --test windows_advisory packaged_qualification_workflow_is_immutable_and_non_publishing -- --nocapture. This is a current failure, not a red/green witness.
Evidence gaps
- Artifact-verifier sensor failed with exit code 2, yet PR is opened and ready_for_review—unclear whether the workflow's machine receipt file digests would survive verifier expectations.
|
Repair update for exact head 7a1f8c6: the prior hosted check-workflows failure identified the missing policy/workflow_allowlist.txt budget entry for this new workflow. Added the narrow 50-line allowlist record in commit 7a1f8c6. Focused proof is current: cargo xtask check-workflows PASS; cargo fmt --all -- --check PASS; git diff --check PASS; actionlint PASS; cargo test -p xtask packaged_qualification -- --nocapture PASS (1 test). Hosted PR checks are still in progress. Disposition remains REVIEW_INCOMPLETE pending current hosted evidence and independent substantive review. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Repair commit pushed at exact head |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/windows-packaged-qualification.yml:
- Around line 177-183: Update the always-run “Write Actions-only qualification
receipt” step to create the directory referenced by $env:QUAL_ROOT before
writing qualification-receipt.json or receipt-file-digests.json. Ensure this
initialization succeeds even when checkout or candidate validation failed,
allowing rejection evidence to be generated and uploaded.
- Line 37: Pin all four action references in
.github/workflows/windows-packaged-qualification.yml at lines 37, 61, 65, and
187 to immutable 40-character commit SHAs, preserving each action’s intended
identity. Update xtask/src/windows_advisory.rs lines 966-970 to assert the
pinned actions/upload-artifact identity and corresponding SHA.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 28cbbc8e-8ac0-4af2-8efd-4faa6b3cf921
📒 Files selected for processing (8)
.github/workflows/windows-packaged-qualification.ymldocs/DOCUMENTATION.mddocs/WINDOWS_PACKAGED_QUALIFICATION.mdpolicy/windows-packaged-qualification.tomlpolicy/workflow_allowlist.txtxtask/src/main.rsxtask/src/tests.rsxtask/src/windows_advisory.rs
|
Final oracle repair pushed at exact head |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — exact-head substantive review
reviewed_head_sha: e94515f
integration_basis: base main at 9f0682f; required Ripr Rust Small Result is green at this head
claim_boundary: add a credential-free, workflow_dispatch-only Windows packaged qualification rehearsal; it does not authorize release, signing, publication, source integration, or merge
changed_surfaces_and_semantic_owners_inspected: workflow owns immutable candidate/ref checks, isolated package/editor journeys, receipt upload, and no-publication permissions; policy/docs own the claim and non-claim boundary; xtask owns packaged-vs-built VS Code server selection and the static workflow contract test
blocking_findings: none
non_blocking_suggestions: Codecov patch check is advisory and reports 84.88% (target 88.73%) on 13 uncovered lines in xtask/src/main.rs; it is not a required branch-protection context. The workflow's Windows journey is intentionally post-merge/manual and is not claimed as executed by this PR.
refuted_or_stale_findings: prior exact-head review findings on runner-temp isolation, installed-server preservation, strict tag/SHA binding, receipt-root initialization, and immutable action pins are repaired and verified in the current diff; both review threads are resolved. The earlier review was anchored to older heads and is not itself used as current-head approval.
proof_and_ci_observed: git diff --check PASS; actionlint PASS per current PR evidence; current-head hosted checks PASS: Ripr Rust Small Result, Ripr Rust Small on GitHub Hosted, rust-tests-junit, rust-coverage, source-of-truth, ub-review, cargo-deny, dependency-review, pr-plan, and GitGuardian. The static contract test and focused Cargo proof were previously PASS on repaired heads; current remote exact-head proof is authoritative for this disposition.
proof_or_review_missing: no independent hosted reviewer is available (CodeRabbit rate-limited; Gemini quota); author self-review is submitted as COMMENT per repository review contract. No Windows packaged qualification receipt exists yet because the workflow is intentionally unavailable until merged.
affected_currentness_dimensions: production implementation, test oracle, public claim, generated relationships, integration basis, candidate head identity, and exact-head CI were re-read for e94515f
residual_assumptions_and_non_claims: exact candidate tag/SHA and W5 qualification must be dispatched after merge; this review does not claim package correctness, test/mutation adequacy, release readiness, publication safety beyond the workflow's declared permissions, or merge safety of unrelated changes
disposition: REVIEW_READY
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Confirmed findings
- No direct crypto/compression/runtime siblings exist in this diff. Residual risk: xtask
vscode_test_server_pathis unchanged and may still be called by other xtask commands expecting built path semantics; not a sibling but worth a human spot-check after merge. - PowerShell Get-CimInstance Win32_Process ownership scan uses a substring match on CommandLine containing QUAL_ROOT plus a regex on Name; on Windows long paths or junction-substituted QUAL_ROOT, owned orphan ripr/Code/electron processes whose resolved command line no longer contains the literal QUAL_ROOT string would not be detected, weakening the orphan-process assertion. Workflow is Actions-only and receipts-only, so impact is limited to evidence completeness rather than a release primitive.
- workflow_allowlist.txt budget grew by one entry; if future exact-candidate lanes multiply, consider a named-budget column rather than a per-workflow scalar to keep drift visible.
- Working directory for editor steps is editors/vscode while absolute back-paths reference $env:QUAL_ROOT; under a junction substitution, QUAL_ROOT could resolve outside the workspace and the prefix guard then allows leakage. Prior lane flagged this and the workflow does not document junction-symlink refusal.
- Lane has no UB-active-view surface in this diff; the Rust delta is a path/env-var selector plus a text-only test. Residual risk: power-shell orphan-process matcher and pwsh long-path/junction substitution are workflow-scope, not UB-active-view.
Verification questions
- Confirm select_vscode_test_server is a brand-new helper; sibling scan should check xtask/src/main.rs around vscode_test_server_path, vscode_compile, and run_cwd_command_with_envs for overlap or duplicate selection logic.
- Confirm no regression test asserts select_vscode_test_server is actually wired into vscode_test_e2e beyond a new tuple-returning helper; coverage of the env-var precedence path is unit-only.
- Confirm workflow_allowlist.txt budget 50 lines is an intentionally narrow cap; the workflow is 196 lines including blank/comments, contract test asserts no secrets/gh release/vsce publish/ovsx publish tokens.
- Confirm windows_advisory.rs packaged_qualification_workflow_is_immutable_and_non_publishing is a static text-grep test against the workflow YAML; it asserts permissions, ref binding, SHA/ref regex, git ls-remote identity, runner-temp prefix, and forbids gh release/vsce publish/ovsx publish/secrets. tokens.
Test proof
- Focused HEAD proof failed (exit 101):
cargo test --locked --package xtask --test tests vscode_e2e_preserves_installed_server_selection. This is a current failure, not a red/green witness.
Refuted
- Box::from(slice) / Box::<[u8]>::from(slice) allocation failure could mask unchanged correctness; refuted because: No allocation-failure path is opened or modified by this diff; the only Rust change is a PathBuf selection helper and a text-grep test. No Box::from, Vec::from, or heap allocation site is touched.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e94515f9c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| steps: | ||
| - name: Initialize receipt root | ||
| shell: pwsh | ||
| run: New-Item -ItemType Directory -Force -Path $env:QUAL_ROOT | Out-Null |
There was a problem hiding this comment.
Move receipt initialization after checkout
On a fresh hosted runner, this creates QUAL_ROOT inside github.workspace before actions/checkout; because that directory is not yet a Git repository, checkout prepares the workspace by deleting its existing contents, including the receipt root. The subsequent identity step then tries to write candidate-identity.json into a missing directory and the qualification fails before packaging. Move this initialization immediately after checkout, or place the receipt root outside the checkout directory, and validate with an actual manual dispatch.
AGENTS.md reference: AGENTS.md:L262-L270
Useful? React with 👍 / 👎.
| $ErrorActionPreference = 'Stop'; $extract = Join-Path $env:QUAL_ROOT 'vsix-extracted'; New-Item -ItemType Directory -Force -Path $extract | Out-Null; Expand-Archive -LiteralPath $env:RIPR_VSIX -DestinationPath $extract -Force | ||
| $env:RIPR_TEST_EXTENSION_PATH = Join-Path $extract 'extension'; $env:RIPR_TEST_SERVER_PATH = $env:RIPR_PACKAGED; $env:RIPR_TEST_WORKSPACE_TRUST = 'trusted'; $env:RIPR_TEST_ARTIFACT_ROOT = Join-Path $env:QUAL_ROOT 'trusted-editor' | ||
| npm run test:e2e 2>&1 | Tee-Object (Join-Path $env:QUAL_ROOT 'editor-trusted.log'); if ($LASTEXITCODE -ne 0) { throw "trusted editor journey failed with exit $LASTEXITCODE" } | ||
| $owned = Get-CimInstance Win32_Process | Where-Object { $_.CommandLine -and $_.CommandLine -like "*$env:QUAL_ROOT*" -and ($_.Name -match 'ripr|Code|electron') }; if ($owned) { $owned | Format-List Name,ProcessId,CommandLine; throw 'trusted editor journey left an owned process' } |
There was a problem hiding this comment.
Track packaged server processes by their actual path
If extension shutdown leaves ripr.exe running, this orphan check does not detect it: the packaged executable is installed under QUAL_TEMP_ROOT, while the predicate requires its command line to contain QUAL_ROOT. A server launched as $env:RIPR_PACKAGED lsp --stdio therefore escapes the check and can retain the Windows file lock even though the workflow and policy claim orphan-process coverage. Track the spawned PID or match the exact packaged binary/temporary root, then exercise the check with a deliberately retained server process.
AGENTS.md reference: AGENTS.md:L321-L322
Useful? React with 👍 / 👎.
| let scalar = |key: &str| { | ||
| lines | ||
| .iter() | ||
| .find_map(|line| { | ||
| line.strip_prefix(key) | ||
| .and_then(|value| value.strip_prefix(':')) |
There was a problem hiding this comment.
Validate every security-sensitive workflow mapping
This oracle accepts only the first textual occurrence of each key, so an unsafe duplicate such as job-level contents: write, another checkout with persist-credentials: true, or a second floating ref can be added while the test named immutable_and_non_publishing remains green. Parse the workflow structurally or reject duplicate/conflicting security-critical mappings, and add negative fixtures for those mutations so the enforcement matches the test's stated contract.
AGENTS.md reference: AGENTS.md:L262-L270
Useful? React with 👍 / 👎.
|
Post-merge W5 qualification receipt (workflow run
The identity checks reached the receipt write, but the workflow failed because |
Summary
.crateand package/digest/extract the exact VSIX; run isolated CLI and trusted/untrusted editor journeys.Swarm / Source Boundary
This PR does not move crates.io, VS Marketplace, Open VSX, GitHub Release, signing, or secret publication surfaces.
Source-of-truth Links
docs/release-candidates/0.11.0-live-head-selection.jsonand the live-history release transactionScope
One workflow-dispatch lane accepts
candidate_shapluscandidate_ref, checks that the immutable ref resolves to the exact SHA, and then performs packaged CLI/editor proof onwindows-latest.Production delta: new on-demand workflow only; no product/version/candidate/tag change.
Evidence delta: policy ledger, documentation, static workflow contract test, and Actions-only receipt upload.
Single acceptance criterion: the workflow cannot run against a floating branch or publish anything, and its receipts bind crate/binary/VSIX and CLI/editor journeys to the exact candidate SHA.
Non-goals: release qualification/authorization, source integration, publication, signing, marketplace operations, or merge.
Policy Impact
policy/windows-packaged-qualification.tomlrequires full SHA/ref identity, isolated package paths, Actions-only receipts, and explicit non-claims.Proof
All four passed.
cargo xtask check-workflowswas attempted but timed out after five minutes under shared Windows/Cargo load; it is not claimed as passed. The Windows package/editor journey itself is intentionally executed by the new hosted manual lane after publication.Claim Boundary
This PR establishes a reviewable Actions-only rehearsal path. A successful run may claim only that the named exact candidate artifacts built and emitted the retained Windows packaged journey evidence. It does not establish correctness, mutation/test adequacy, release readiness, publication, signing, source integration, or merge safety.
Rollback
Revert this PR; it adds no product state, tag, release, or remote setting mutation.
Spec-Test-Code Traceability
xtask/src/windows_advisory.rsstatic workflow contract test.github/workflows/windows-packaged-qualification.ymldocs/WINDOWS_PACKAGED_QUALIFICATION.md,policy/windows-packaged-qualification.tomlCI Economics
workflow_dispatchworkflow.windows-advisorydoes not exercise installed crate/VSIX artifacts or exact candidate identity, so it is insufficient for this claim.