Repository navigation
test(artifacts): restore publishing permission regression tests - #41364
Conversation
#41012 and #41007 removed the tests that guard #40948 (new profiles allow artifact publishing, profiles saved before the setting stay off, web clients fail closed until the host grant is mirrored) and #40982 (moving a project between profiles must not grant publishing to an older profile). Restore them against current paths. Each fails when the code it guards is reverted.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ELI5
Two recent test cleanups deleted the tests that make sure Orca never turns on public artifact publishing for an existing user without asking. This puts those tests back. Nothing about the app changes.
What Changed
Tests only. They are restored and adapted to current file paths:
persistence-artifact-sharing-default.test.ts(from feat(artifacts): allow artifact publishing by default for new profiles #40948, deleted in test: remove 79 low-value tests across 39 suites #41012): a new profile allows publishing and keeps it after a reload, and a profile saved before the setting existed loads as off.web-artifact-sharing-setting.test.ts(from feat(artifacts): allow artifact publishing by default for new profiles #40948, deleted in Remove 181 low-value tests and 28 entire suites #41007): with nothing saved locally, the web client's fallback reports publishing off; a locally saved grant is read back. This covers the fallback only, not syncing the host's setting.profile-project-transfer.test.ts, replacing fix(artifacts): preserve publishing permission in offline profile writes #40982's transfer test, which went when test: remove 79 low-value tests across 39 suites #41012 deletedprofile-project-domain-transfer.test.ts: moving a project between older profiles gives neither profile permission.The saved-opt-out and explicit-choice cases are left out: saved values already win in both paths, so reverting #40948 or #40982 does not fail them (review C1).
Why
STA-14784 (P1) was a real permission leak. Writing an older profile offline merged the new-profile default (
artifactSharingEnabled: true) into it. The code fix (#40982) is still on main, but only its offlineagent hookstest survived. Nothing guarded the project-transfer path, the rule that a profile without the setting loads as off, or the web fallback.Linked Issue
Linear STA-14784. Follow-up to #40948 and #40982.
Visual Proof
N/A: tests only, nothing a user can see changes.
Testing
profile-project-state-file.ts, the=== truenormalization innormalize-loaded-global-settings.ts, and the webartifactSharingEnabled: falseoverride. One matching test failed for each.pnpm run lint(46 steps),typecheck:node,typecheck:weband oxfmt pass.Risk
Level: Low. Adds tests only. Revert with a plain revert.
Review
Technical review chaired by Eng - Neil. C1 asked for two changes, both fixed in 4132cfa. C2 was clean on 4132cfa.
Agent skill upstream boundary
Notes
Tests only, so there is no security, cross-platform, SSH, mobile, compatibility or performance impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (lint, node/web typecheck and the changed suites ran locally; CI covers the rest)