Skip to content

fix(scripts): complete the transparency notice in the API test harnesses - #1755

Merged
FelixTJDietrich merged 1 commit into
mainfrom
fix/upgrade-drill-consent
Sep 3, 2026
Merged

fix(scripts): complete the transparency notice in the API test harnesses#1755
FelixTJDietrich merged 1 commit into
mainfrom
fix/upgrade-drill-consent

Conversation

@FelixTJDietrich

Copy link
Copy Markdown
Collaborator

What changed and why

upgrade-test / upgrade fails in the v0.75.0 release run with

Error: Core read /workspaces returned 428:
{"detail":"Complete the current transparency notice first","instance":"/workspaces",
 "status":428,"title":"Precondition Required"}

The server is right and the harness is wrong. The consent gate applies only to a request whose token
subject is an account — a person's session — and lets GET /user, GET|PUT /user/consent, logout and
refresh through; machine callers (webhook ingest, worker registration, the agent callbacks) carry no
account subject and are not gated at all. The drill signs in through /auth/dev-login, which mints
exactly the session the OAuth success path mints, and then does the reads a browser does. It is a
first login, and it was skipping the step every first login takes. After the upgrade, the account
seeded on v0.74.0 has no decision recorded against the new notice, which is the intended re-prompt.

So the harness completes the notice the way the interstitial does: read GET /user/consent for the
current version, then PUT /user/consent with the terms accepted and research participation
declined. Nothing about the gate changes.

scripts/e2e-setup.ts seeds a live instance over the same dev-login session and hits the same
gated endpoints, so it gets the same step. The browser suite already handled this — loginAsDevAdmin
in webapp/e2e/fixtures.ts walks the real interstitial — and both additions follow it in tolerating
an account that has already accepted.

The drill runs against released images as well as the candidate, so it treats a 404 from
/user/consent as "this release predates the notice" and a completed status as "already accepted"
rather than assuming either.

How to test

Reproduced against the exact images from the failing run:

node scripts/release-upgrade-test.ts \
  ghcr.io/ls1intum/hephaestus/application-server@sha256:45a0df4115ed89b292a1db21977fe002b3d502af3b35591a9612d484b9cff7cd \
  ghcr.io/hephaestus-build/application-server@sha256:e15239825906263e62b08ff53e9f72fa0fedcb1c111c42371927eb0249ccd283 \
  ghcr.io/hephaestus-build/postgres@sha256:6f891a185fa72325e37f7a07839d6464be15f6a1b94e718cbde85539f644d359

With the script from main this fails with the 428 above at the post-upgrade read; with this change
it prints Seeded previous-release upgrade passed. pnpm run format and pnpm run check are green.

Release impact

No changeset: this changes release and E2E tooling only, no shipped code and no operator-visible
behaviour. The consent gate is untouched — the point of the change is that CI now satisfies it
instead of avoiding it.

Notes for reviewers

The interesting question is which side was wrong; the reasoning is above, and the short version is
that the drill authenticates as a person, so the gate applies to it correctly. If you disagree —
i.e. if the drill should be a machine path — the fix would belong in the harness anyway, since the
gate keys off the session type rather than the endpoint.

Model: Claude Fable 5. Harness: Claude Code.

A signed-in person must complete the current transparency notice before the
server answers anything else, so the release upgrade drill's post-upgrade reads
returned 428 "Complete the current transparency notice first" — the gate is
right and the harness was signing in like a first-time user and then skipping
the step that user takes.

Both harnesses that drive the API with a dev-login session now complete the
notice through the same endpoint the first-login interstitial posts to, and
neither weakens the gate: the drill tolerates a release that predates the notice
and a session that already accepted it, and each accepts the terms without
opting into research. The browser suite's fixture already did this through the
interstitial itself.

Verified by running the drill locally against the v0.75.0 candidate and v0.74.0
images from the failing release run: it reproduces the reported 428 before the
change and passes after it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: b9e0f43c-3e9f-4f47-b886-6fb37fc1778b

📥 Commits

Reviewing files that changed from the base of the PR and between 7459495 and 5daf88c.

📒 Files selected for processing (2)
  • scripts/e2e-setup.ts
  • scripts/release-upgrade-test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved automatically: @FelixTJDietrich is listed in the REVIEW_POLICY_MAINTAINERS repository variable, which the repository treats as satisfying the review requirement. See the review policy in docs/contributor/ci-cd.mdx.

@github-actions github-actions Bot added the bug Something isn't working label Sep 2, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to In Review in Hephaestus Sep 2, 2026
@github-actions github-actions Bot added the size:M Pull request diff size, applied automatically by the PR labeler; issues use the Effort field label Sep 2, 2026
@FelixTJDietrich
FelixTJDietrich added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit f245cc2 Sep 3, 2026
34 checks passed
@FelixTJDietrich
FelixTJDietrich deleted the fix/upgrade-drill-consent branch September 3, 2026 00:19
@github-project-automation github-project-automation Bot moved this from In Review to Done in Hephaestus Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Preview

Preview has been removed (PR closed)

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🧩 Storybook Preview

Preview has been removed (PR closed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:M Pull request diff size, applied automatically by the PR labeler; issues use the Effort field

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant