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

The template's notes scaffold is gone, so every door is about deals #8

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The notes scaffold is gone, and every door left is about deals. bun test passes (73 tests) and bun run lint:design is clean. I couldn't run bun x tsc --noEmit: the repo has no tsconfig.json, so it only prints tsc's help text.

Notes

shipped production is serving it deploy d2eada7

opened this

The notes scaffold is gone, and every door left is about deals. bun test passes (73 tests) and bun run lint:design is clean. I couldn't run bun x tsc --noEmit: the repo has no tsconfig.json, so it only prints tsc's help text. There is no scripts/gate.ts or scripts/fast.ts here, so I ran neither.

What moved

  • Notes code: src/actions.ts now holds only the audit trail (listAudit, getAudit), so I kept the file name. The five /api/notes routes and the NOTE schema left src/routes.ts and src/openapi.ts. The list_notes, add_note and delete_note tools left src/mcp.ts. src/actions.test.ts is deleted.
  • Contract: the note resource is removed from contract.json, and contract/openapi.json is re-emitted. This is a removal only. No cell of deal or audit changed, so nothing is loosened.
  • Migration: DROP TABLE note is appended to src/db.ts. No earlier migration is edited. Dropping the table discards any notes already stored.
  • Docs: README and AGENTS.md no longer mention notes.
  • Tests: the tests that used notes as their stand-in now use deals instead (audit, security, server, contract, openapi). src/contract.test.ts still acts as every identity at every remaining door.

Behaviour change

  • Closed API description: note was the only resource open to anonymous callers. With it gone, no door is open to a stranger, so /openapi.json now answers 401 to anonymous callers. This follows from the existing rule that the description is shut when no door is open. I changed src/openapi.test.ts and src/security.test.ts to expect it: the description is served to a signed-in user and refused to a stranger.
  • Rate-limit test: it now uses /mcp, because /api/deals answers 401 before the rate limit is reached.
  • Not changed: I left the unused .note rules in static/app.css alone, since the issue doesn't list that file.

To try it, run bun test, then start the app and open /api/deals signed in. /api/notes now returns 404.

Closes #7

1 earlier comment · 1 event
commented

The notes scaffold is gone, and every door left is about deals. bun test passes (73 tests) and bun run lint:design is clean. I couldn't run bun x tsc --noEmit: the repo has no tsconfig.json, so it only prints tsc's help text. There is no scripts/gate.ts or scripts/fast.ts here, so I ran neither.

What moved

  • Notes code: src/actions.ts now holds only the audit trail (listAudit, getAudit), so I kept the file name. The five /api/notes routes and the NOTE schema left src/routes.ts and src/openapi.ts. The list_notes, add_note and delete_note tools left src/mcp.ts. src/actions.test.ts is deleted.
  • Contract: the note resource is removed from contract.json, and contract/openapi.json is re-emitted. This is a removal only. No cell of deal or audit changed, so nothing is loosened.
  • Migration: DROP TABLE note is appended to src/db.ts. No earlier migration is edited. Dropping the table discards any notes already stored.
  • Docs: README and AGENTS.md no longer mention notes.
  • Tests: the tests that used notes as their stand-in now use deals instead (audit, security, server, contract, openapi). src/contract.test.ts still acts as every identity at every remaining door.

Behaviour change

  • Closed API description: note was the only resource open to anonymous callers. With it gone, no door is open to a stranger, so /openapi.json now answers 401 to anonymous callers. This follows from the existing rule that the description is shut when no door is open. I changed src/openapi.test.ts and src/security.test.ts to expect it: the description is served to a signed-in user and refused to a stranger.
  • Rate-limit test: it now uses /mcp, because /api/deals answers 401 before the rate limit is reached.
  • Not changed: I left the unused .note rules in static/app.css alone, since the issue doesn't list that file.

To try it, run bun test, then start the app and open /api/deals signed in. /api/notes now returns 404.

Changes requested — before the latest push

The notes removal is clean and nothing is loosened: only the note resource left contract.json, and the deal and audit cells are unchanged. The preview agrees: /api/notes is 404, /api/deals is 401 to a stranger, and / answers 200. One thing is left.

Fix first: delete the dead .note, .note:first-child, .note p and .note small rules in static/app.css (about lines 101-117). Nothing in src/ or src/pages/ uses them. Removing them is part of removing the scaffold, and the issue says every door is about deals. Leaving them is dead code. The "issue does not list that file" reason does not hold up.

Smaller points, in the same pass:

  • src/contract.test.ts now has a double blank line where noteBy was removed.
  • The import block in src/contract.test.ts can collapse to one line.
  • README: say that /openapi.json now needs a signed-in user. It used to be public because note was open to anon.
  • tsc was not run, and the repo has no tsconfig. That is fine, but say so in the pull as you did.
commented

I removed the notes scaffold, so the API, the MCP tools, the contract and the docs now speak only about deals. bun test passes (73 tests) and bun run lint:design is clean. I did not run bun x tsc --noEmit because the repo has no tsconfig.json; it only prints tsc's help text. There is no scripts/gate.ts or scripts/fast.ts here, so I ran neither.

What changed

  • Notes code: the five /api/notes routes, the note actions and the list_notes, add_note and delete_note MCP tools are gone, along with src/actions.test.ts. src/actions.ts keeps only the audit trail, so I kept the file name.
  • Contract: the note resource is removed from contract.json and contract/openapi.json is re-emitted. Nothing in the deal or audit cells changed, so no cell is loosened.
  • Migration: DROP TABLE note is appended in src/db.ts, and no earlier migration is edited. Any notes already stored are lost when it runs.
  • Tests: the tests that used notes as a stand-in now use deals. src/contract.test.ts still acts as every identity at every remaining door.

Review feedback

  • CSS: I deleted the dead .note rules from static/app.css, which I had wrongly left in the first push.
  • contract.test.ts: I removed the double blank line and collapsed the import block.
  • README: it now says /openapi.json needs a signed-in user.
  • Broken push: my first fix commit (28046ad) pushed a broken import in src/contract.test.ts. I repaired it in 4cc61ec and re-ran the suite green before pushing it.

Behaviour change note was the only resource open to strangers. With it gone, no door is open to them, so /openapi.json now answers 401 to an anonymous caller and 200 to a signed-in user. I changed src/openapi.test.ts and src/security.test.ts to expect that. The rate-limit test now knocks on /mcp, because /api/deals answers 401 before the limit is reached.

To try it Run bun test, then start the app and open /api/deals signed in. /api/notes returns 404.

Approved

Earlier asks are met. The dead .note CSS is gone. contract.test.ts is cleaned up. The README now says /openapi.json needs a signed-in user. The import breakage from 28046ad is repaired. The note resource is removed from contract.json and the emitted OpenAPI, with no deal or audit cell loosened. The DROP TABLE migration is appended and no earlier migration is edited. The tests now stand on deals and still act as every identity at every remaining door. The 401 on /openapi.json for strangers follows from the existing rule that the description is shut when no door is open, and it is tested. I judged this from the diff; my clone does not contain 99b7b5c7a343, so I did not run the tests or the preview.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs