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

The note door lands from pull #4824's branch, with moderation taken off the app's host #4911

opened this

Merged 44d 17h ago, live in production

This lands pull #4824's note door, rebased on main, with moderation taken off the app host. The type check is clean, and test/apps-feedback, test/apps-feedback-mirror and test/tui-notes pass. I did not run the whole suite, so the forge's check will be its first full run.

Notes

opened this

This lands pull #4824's note door, rebased on main, with moderation taken off the app host. The type check is clean, and test/apps-feedback, test/apps-feedback-mirror and test/tui-notes pass. I did not run the whole suite, so the forge's check will be its first full run.

What changed

  • The six commits from #4824 (head 1399ada9) rebased onto main with no conflicts.
  • /__forge/note/moderate is now a 404 in src/apps/feedback.ts for any method and any cookie. It is answered before the door lookup, so it never reaches the app. The app host answers only POST /__forge/note and GET /__forge/notes.
  • moderateNote in src/actions/app_notes.ts is untouched, for #4819's forge-origin screen to call. The HTTP handler that wrapped it is gone.
  • A new test in test/apps-feedback.test.ts checks that POST, GET, PUT and DELETE to /__forge/note/moderate all return 404, with no cookie and with an admin grant cookie.
  • The old moderation test now calls moderateNote directly, still covering hide, ban, the closed issue, the refused sender and the unknown id. The 403 checks for strangers went with the endpoint, since the function does no admin check; the caller does.
  • The README's note-door paragraph now says moderation happens on the forge, not on the app, and why. The terminal screen is the owner's tool today.

Left alone: the reviewer's note that a preview's script can file a note as the visiting person. It is out of scope here.

To try it: run bun test test/apps-feedback. Against a running app, curl -i -X POST <app-host>/__forge/note/moderate answers 404.

Closes #4910

commented

This lands pull #4824's note door, rebased on main, with moderation taken off the app host. The type check is clean, and test/apps-feedback, test/apps-feedback-mirror and test/tui-notes pass. I did not run the whole suite, so the forge's check will be its first full run.

What changed

  • The six commits from #4824 (head 1399ada9) rebased onto main with no conflicts.
  • /__forge/note/moderate is now a 404 in src/apps/feedback.ts for any method and any cookie. It is answered before the door lookup, so it never reaches the app. The app host answers only POST /__forge/note and GET /__forge/notes.
  • moderateNote in src/actions/app_notes.ts is untouched, for #4819's forge-origin screen to call. The HTTP handler that wrapped it is gone.
  • A new test in test/apps-feedback.test.ts checks that POST, GET, PUT and DELETE to /__forge/note/moderate all return 404, with no cookie and with an admin grant cookie.
  • The old moderation test now calls moderateNote directly, still covering hide, ban, the closed issue, the refused sender and the unknown id. The 403 checks for strangers went with the endpoint, since the function does no admin check; the caller does.
  • The README's note-door paragraph now says moderation happens on the forge, not on the app, and why. The terminal screen is the owner's tool today.

Left alone: the reviewer's note that a preview's script can file a note as the visiting person. It is out of scope here.

To try it: run bun test test/apps-feedback. Against a running app, curl -i -X POST <app-host>/__forge/note/moderate answers 404.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs