Skip to content

feat(artifacts): default the share inbox on, with a kill switch - #986

Merged
philmerrell merged 1 commit into
developfrom
feature/artifact-share-inbox-default-on
Sep 6, 2026
Merged

feat(artifacts): default the share inbox on, with a kill switch#986
philmerrell merged 1 commit into
developfrom
feature/artifact-share-inbox-default-on

Conversation

@philmerrell

Copy link
Copy Markdown
Contributor

Why

The "Shared with you" inbox shipped default-off and opt-in in 1.18.0, and the flag documented exactly why:

Every other flag in this module ships default-on with a kill switch; this one is deliberately the other way round, because the surface it gates lands before the product decision about it does.

That decision has now been made — the inbox went live in prod with 1.18.0 — so the reason for the inversion is spent.

Carrying an opt-in default past it has a real cost for a repo that is forked by other institutions: every deployment would silently lose a finished feature and have to discover a variable to get it back. Default-on is the right answer for a fork, and "false" still turns it off for anyone who wants it dark.

What changed

Four places encoded the default, and all four had to move together:

File Change
backend/src/apis/shared/feature_flags.py == "true"!= "false", matching announcements_enabled / scheduled_runs_enabled
infrastructure/lib/config.ts opt-in ternary → the kill-switch ternary; ?? false?? true. Same shape as scheduledRuns
.github/workflows/platform.yml the comment told a reader the opposite
app-api-service-construct.ts same

Plus docs-site/.../features/artifacts.md, which described the opt-in behaviour and the reason for it.

The empty-string case is now load-bearing in the other direction

An unset GitHub Actions variable forwards "". Under the old default that resolved to off — which was the intended default. Under this one it must resolve to on, and getting it backwards is the single most likely way to ship a default-on flag silently disabled to every fork that never sets the variable.

So it is pinned by test on both sides of the boundary:

  • Backendtest_only_the_literal_false_disables_the_inbox asserts "", " " and junk values all leave the feature on, and a new test_inbox_is_on_when_the_flag_is_unset covers the unset case directly.
  • CDK — this flag had no config coverage at all. Added a block matching the scheduledRuns one: unset, empty string, "false", "true", and the cdk.json context path.

The backend tests are mutation-checked: reverting the flag to == "true" fails exactly the two new tests and nothing else.

Verification

  • backend: 348 passed (tests/apis/app_api/artifacts + tests/apis/shared)
  • infrastructure: 789 passed across 41 suites, npx tsc --noEmit clean

Deployment

Takes effect on the next platform.yml run — CDK writes the value into the ECS task definition, and this PR touches config.ts, so the merge to develop triggers it for dev automatically.

No environment variable changes are required. CDK_ARTIFACT_SHARE_INBOX_ENABLED=true is currently set explicitly on both development and production; those are now redundant but harmless and correct, so I have left them. Removing them would exercise the new default path — your call, and it can happen any time.

No data migration: the fan-out rows behind the inbox have always been written unconditionally, which is what makes this toggle complete and instant in either direction.

🤖 Generated with Claude Code

The "Shared with you" inbox shipped default-off and opt-in in 1.18.0, and
the flag documented exactly why: "the surface it gates lands before the
product decision about it does." That decision has now been made — the inbox
is live — so the reason for the inversion is spent.

Carrying an opt-in default past it has a real cost for a repo that is forked:
every institution deploying this stack would silently lose a finished feature
and have to discover a variable to get it back. Default-on is the right answer
for a fork, and "false" still turns it off for anyone who wants it dark.

Flipped in all four places that encode the default:

- feature_flags.py: `== "true"` -> `!= "false"` (house style, matching
  announcements_enabled / scheduled_runs_enabled)
- config.ts: the opt-in ternary -> the kill-switch ternary, `?? false` ->
  `?? true`, same shape as scheduledRuns
- platform.yml and app-api-service-construct.ts: the comments that told a
  reader the opposite

The empty-string case is now load-bearing in the other direction: an unset
GitHub Actions variable forwards "", which must resolve to ON. That is the
single most likely way to ship this flag silently disabled, so it is pinned
by test on both sides of the boundary — and the backend tests are
mutation-checked (reverting the flag fails exactly the two new ones).

Adds CDK config coverage for this flag, which had none at all: unset, empty,
"false", "true", and the cdk.json context path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@philmerrell
philmerrell merged commit fc9dbb5 into develop Sep 6, 2026
4 checks passed
@philmerrell
philmerrell deleted the feature/artifact-share-inbox-default-on branch September 6, 2026 20:11
@philmerrell philmerrell mentioned this pull request Sep 6, 2026
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