Skip to content

fix(checks): repo quality checks run in a throwaway data directory - #16353

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
maxmad64bis:fix/repo-checks-isolate-data-dir
Oct 13, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
maxmad64bis:fix/repo-checks-isolate-data-dir

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306

Summary

Quality checks that load application modules opened the operator data directory when no data directory was set, so running them on a machine with a live instance applied pending migrations and request-detail rotation to that database and could lock it. Each of the three checks now points at a throwaway data directory when none is chosen and keeps using an explicitly set one, and a new test fails any check that loads application modules without that isolation.

Related Issues

  • No linked issue — reproduced on the release base

Target Branch

  • Base is the active release/v3.8.x branch (the highest open release/v*), not main
  • New feature? From 3.8.55 on it is held with the v4-feature label for the v4 channel

Validation

  • Change type: other
  • Focused tests and category gates from the golden path
  • npm run lint
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/repo-checks-isolate-datadir.test.ts — runs each check in a subprocess with a fake home directory and asserts the default directory stays untouched, an explicit directory is used as is, blank input counts as unset, the opt-out still resolves the operator directory, and a static-import scan names any unisolated check.

Coverage Notes

  • scripts/check/check-known-symbols.ts is covered by the untouched-directory and explicit-directory cases in the new test.
  • scripts/check/check-compression-budget.ts is covered by the untouched-directory case and the throwaway-directory probe in the new test.
  • scripts/check/check-route-guard-membership.ts is covered by the untouched-directory and explicit-directory cases in the new test.

Reviewer Notes

  • Behavior: running a check without a data directory set no longer touches the operator database (before → it opened and migrated it; after → it works in a throwaway directory); setting OMNIROUTE_ALLOW_DEFAULT_DATA_DIR=1 keeps the previous behavior.
  • Follow-up: extending the guard to every script run under tsx or bun stays for the maintainer to decide.

@maxmad64bis
maxmad64bis force-pushed the fix/repo-checks-isolate-data-dir branch 2 times, most recently from 9acd255 to 21fec1e Compare October 11, 2026 16:56
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 11, 2026 17:16
@maxmad64bis
maxmad64bis marked this pull request as draft October 11, 2026 21:51
@maxmad64bis
maxmad64bis force-pushed the fix/repo-checks-isolate-data-dir branch from 21fec1e to 8ad5820 Compare October 11, 2026 21:52
@maxmad64bis
maxmad64bis force-pushed the fix/repo-checks-isolate-data-dir branch from 8ad5820 to 5e6574f Compare October 11, 2026 22:29
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 11, 2026 23:02
@diegosouzapw
diegosouzapw merged commit 059705e into cheaper-inference:release/v3.8.52 Oct 13, 2026
31 of 78 checks passed
diegosouzapw added a commit to KiaroSama/OmniRoute that referenced this pull request Oct 13, 2026
stryker.conf.json: keep both sides of tap.testFiles (the branch's six fixtures plus
combo-pinned-empty-turn, and the release tip's account-weighted-runtime-16459 and
memory-extraction-pii-sanitization entries), and add the two covering tests the
release tip itself omits (repo-checks-isolate-datadir from cheaper-inference#16353,
combo-model-lock-pre-dispatch-wait-16319 from cheaper-inference#16360) so
check:mutation-test-coverage --strict passes on the merged tree.
@maxmad64bis
maxmad64bis deleted the fix/repo-checks-isolate-data-dir branch October 13, 2026 20:49
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.

2 participants