Skip to content

fix(build): deduplicate required artifact paths - #12422

Merged
diegosouzapw merged 2 commits into
release/v3.8.51from
fix/v3851-pack-required-path-dedup
Sep 2, 2026
Merged

diegosouzapw merged 2 commits into
release/v3.8.51from
fix/v3851-pack-required-path-dedup

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

OWN SCOPE: PASS · CI: BASE-RED

The live release listed bin/cli/utils/volatileEnvPath.mjs twice in
PACK_ARTIFACT_REQUIRED_PATHS. The duplicate made missing-artifact reports contain the same path
twice and left the policy source internally inconsistent.

This PR:

  • removes only the later duplicate; the original required-path entry and its entrypoint coverage
    remain intact;
  • adds a generic regression test requiring every exported artifact-policy array to contain unique
    paths.

RED to GREEN

Evidence Base cabbbe410a Candidate 31606085ba
New uniqueness regression FAIL: duplicate bin/cli/utils/volatileEnvPath.mjs PASS
Existing pack-policy suite 1 additional existing failure because the missing-path report repeated the entry PASS: 18/18
Entrypoint closure suite Not affected PASS: 6/6
Focused ESLint Not applicable PASS, 0 errors
Focused Prettier Not applicable PASS
git diff --check Not applicable PASS

All Node test commands used an explicit fresh temporary DATA_DIR. No live OmniRoute database or
backup was accessed.

Independent base red

GitHub's API Route Typecheck is red on the unrelated
src/app/api/memory/rerank-providers/route.ts TS2307. This two-file PR changes no API route,
database module, TypeScript baseline, package manifest, or tsconfig. The same error was reproduced
on the release source and is repaired independently by open PR #12421, whose exact candidate gate
is green. Until that separate PR is merged by the owner, this PR remains correctly classified as
BASE-RED, not PR-RED.

Scope

  • scripts/build/pack-artifact-policy.ts
  • tests/unit/pack-artifact-policy.test.ts

The branch was created directly from live release/v3.8.51@cabbbe410a. No merge, automerge,
deployment, release, dependency change, or baseline rewrite is performed.

…pack-required-path-dedup

#12423 reached the same end state for scripts/build/pack-artifact-policy.ts — one
justified volatileEnvPath.mjs entry with its #11437 comment — so the production change
here is subsumed and takes the tip's side. What survives is the duplicate guard test,
which does not exist on the tip and which was verified by re-introducing the duplicate
and watching it fail.
@diegosouzapw
diegosouzapw marked this pull request as ready for review September 2, 2026 13:22
@diegosouzapw
diegosouzapw merged commit 451d4cd into release/v3.8.51 Sep 2, 2026
6 of 11 checks passed
@diegosouzapw
diegosouzapw deleted the fix/v3851-pack-required-path-dedup branch September 4, 2026 11:11
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…diegosouzapw#12422)

Reduced on merge rather than closed, because the useful half is not subsumed.

The production change is: diegosouzapw#12423 landed first and reached the same end state for scripts/build/pack-artifact-policy.ts — one volatileEnvPath.mjs entry, keeping the diegosouzapw#11437 comment that explains why it is REQUIRED (bin/omniroute.mjs calls describeVolatileEnvWarning on every CLI boot, and bin/cli/ is only an allowlist prefix, so its absence would otherwise be silent). This PR's base carried three occurrences and reduced them to one; the tip is already there, so that file takes the tip's side.

What survives is the guard test, which does not exist on the tip: it asserts the four artifact path policy arrays contain no duplicate entries, so the class of defect cannot come back quietly. Verified by proof rather than assumption — re-introducing the duplicate makes it fail, removing it makes it pass again.

Verified: 18/18 in pack-artifact-policy after the reduction.

Thanks — the duplicate was real and the guard is the part worth keeping.
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