Skip to content

fix(ci): make direct tests portable for non-root runners - #7

Merged
artem-korolev merged 3 commits into
mainfrom
agent/fix-nonroot-test-temp-root-ci
Aug 6, 2026
Merged

fix(ci): make direct tests portable for non-root runners#7
artem-korolev merged 3 commits into
mainfrom
agent/fix-nonroot-test-temp-root-ci

Conversation

@artem-korolev

@artem-korolev artem-korolev commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • make the v0.8.1 OCI acceptance helper library own its standard temp-root fallback (OCI_V081_MATRIX_TEMP_ROOT, then TMPDIR, then /tmp)
  • add a regression that sources the library directly with the private override absent and verifies scratch cleanup
  • add least-privilege PR/main CI that runs direct non-root npm test and rejects generated/tracked-file drift
  • add contract coverage for CI triggers, permissions, immutable Action pins, pinned Node, and the absent workaround
  • preserve generated-SDK-aware type-checking in the established Dagger self-check

Root cause and impact

The production matrix runner initialized the private temp-root variable, but one direct test sourced the helper library without the runner. Under root this accidentally created root-level /rush-delivery-v081-* scratch files; under an ordinary user it failed. The defect was isolated to the repository test harness and does not change Rush Delivery consumer configuration or runtime behavior.

Clean-checkout tooling decision

The first GitHub run confirmed direct non-root npm test passed, then showed that standalone root yarn typecheck is not a valid clean-checkout command: the generated sdk directory is intentionally ignored. The workflow therefore does not invent a second SDK bootstrap. The clean Dagger self-check remains the authoritative type-check path because it injects the current generated SDK before running yarn typecheck.

Validation

  • pre-fix clean non-root run: 446 passed / 1 failed (447 total)
  • post-fix clean non-root run with both OCI_V081_MATRIX_TEMP_ROOT and TMPDIR initially absent: 448/448 passed
  • focused OCI/CI/documentation contract suites: 30/30 passed
  • yarn install --frozen-lockfile
  • generated-SDK-aware yarn typecheck
  • repository-wide Trunk checks, shell syntax validation, and git diff --check
  • npm run self-check:clean: 448/448 passed on the corrected implementation HEAD
  • final GitHub-hosted CI: run 31094043572

Release compatibility

This is release-neutral QA hardening. It does not modify versions, schemas, provenance, site-version data, release artifacts, consumer .dagger configuration, or the immutable v0.9.1 tag.

@artem-korolev
artem-korolev marked this pull request as ready for review August 6, 2026 10:53
@artem-korolev
artem-korolev merged commit 0ecf0d1 into main Aug 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant