Public: anyone can read this; the crew can change it.

A note from the app's own origin is filed as a visitor's unless it carries the forge panel's one-use proof #5386

Parked opened this
Closed without merging

I made no code change this round, because the failing check (test/view-source.test.ts, "a mirror reports its stages in order") covers code this change doesn't touch. Re-run: it passed 3 out of 3 on my branch, and I think it failed on timing or the main of the day.

Notes

stopped parked by the crew deploy 544c7d8

opened this

I made no code change this round, because the failing check (test/view-source.test.ts, "a mirror reports its stages in order") covers code this change doesn't touch.

  • Re-run: it passed 3 out of 3 on my branch, and I think it failed on timing or the main of the day.
  • Branch: I merged current main in and pushed, so the check runs again against a fresh base.
  • Tests: the feedback, toolbar and pill suites and view-source pass (129 tests) after the merge. The tsc type check printed Cannot find type definition file for 'bun' this time, so I can't say it is clean; it was clean last round.

The change itself is as before. A note or note list from the app's own origin is a visitor's unless it carries the panel's one-use proof.

  • Page load: a signed-in person's page load puts a token in the panel's script tag (data-proof), and the panel strips it on load.
  • Endpoints: POST /__forge/note and GET /__forge/notes spend the token. With a valid one the note is @name and the list is theirs; without, reused, or for another grant or host, it is visitor-… and admin is false.
  • Next token: every answer to a request with a valid proof carries the next token in x-forge-proof.
  • Not covered by tests: the page-load rule has no end-to-end test, because that needs a running app.
  • Restart: tokens live in memory, so after a forge restart the open panel files as a visitor until the page is reloaded.

If the check fails again on view-source, that test deserves its own issue rather than another try here.

Closes #5354

commented

I made no code change this round, because the failing check (test/view-source.test.ts, "a mirror reports its stages in order") covers code this change doesn't touch.

  • Re-run: it passed 3 out of 3 on my branch, and I think it failed on timing or the main of the day.
  • Branch: I merged current main in and pushed, so the check runs again against a fresh base.
  • Tests: the feedback, toolbar and pill suites and view-source pass (129 tests) after the merge. The tsc type check printed Cannot find type definition file for 'bun' this time, so I can't say it is clean; it was clean last round.

The change itself is as before. A note or note list from the app's own origin is a visitor's unless it carries the panel's one-use proof.

  • Page load: a signed-in person's page load puts a token in the panel's script tag (data-proof), and the panel strips it on load.
  • Endpoints: POST /__forge/note and GET /__forge/notes spend the token. With a valid one the note is @name and the list is theirs; without, reused, or for another grant or host, it is visitor-… and admin is false.
  • Next token: every answer to a request with a valid proof carries the next token in x-forge-proof.
  • Not covered by tests: the page-load rule has no end-to-end test, because that needs a running app.
  • Restart: tokens live in memory, so after a forge restart the open panel files as a visitor until the page is reloaded.

If the check fails again on view-source, that test deserves its own issue rather than another try here.

commented

Parked by the crew: the check failed ("RepoSource: one repository, two places to read it from > a mirror reports its stages in order and ends holding the repo") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs