feat(artifacts): default the share inbox on, with a kill switch - #986
Merged
Conversation
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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The "Shared with you" inbox shipped default-off and opt-in in 1.18.0, and the flag documented exactly why:
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:
backend/src/apis/shared/feature_flags.py== "true"→!= "false", matchingannouncements_enabled/scheduled_runs_enabledinfrastructure/lib/config.ts?? false→?? true. Same shape asscheduledRuns.github/workflows/platform.ymlapp-api-service-construct.tsPlus
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:
test_only_the_literal_false_disables_the_inboxasserts""," "and junk values all leave the feature on, and a newtest_inbox_is_on_when_the_flag_is_unsetcovers the unset case directly.scheduledRunsone: unset, empty string,"false","true", and thecdk.jsoncontext 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 --noEmitcleanDeployment
Takes effect on the next
platform.ymlrun — CDK writes the value into the ECS task definition, and this PR touchesconfig.ts, so the merge todeveloptriggers it for dev automatically.No environment variable changes are required.
CDK_ARTIFACT_SHARE_INBOX_ENABLED=trueis currently set explicitly on bothdevelopmentandproduction; 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