hub-open-note-seq.test.mjs
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠ breaking
2 days ago
| 1 | /** |
| 2 | * Contract: openNote uses a monotonic sequence so concurrent fetches cannot duplicate detail-actions buttons. |
| 3 | */ |
| 4 | import { describe, it } from 'node:test'; |
| 5 | import assert from 'node:assert'; |
| 6 | import fs from 'fs'; |
| 7 | import path from 'path'; |
| 8 | import { fileURLToPath } from 'url'; |
| 9 | |
| 10 | const __dirname = path.dirname(fileURLToPath(import.meta.url)); |
| 11 | const hubJs = path.join(__dirname, '..', 'web', 'hub', 'hub.js'); |
| 12 | |
| 13 | describe('hub openNote stale-response guard', () => { |
| 14 | it('hub.js increments hubOpenNoteSeq and ignores stale fetch completions', () => { |
| 15 | const src = fs.readFileSync(hubJs, 'utf8'); |
| 16 | assert.match(src, /\blet hubOpenNoteSeq\b/); |
| 17 | assert.match(src, /const seq = \+\+hubOpenNoteSeq/); |
| 18 | assert.ok(src.includes('if (seq !== hubOpenNoteSeq) return;')); |
| 19 | assert.ok( |
| 20 | src.includes('attachNoteDetailReadActions(actionsEl)') && |
| 21 | /actionsEl\.innerHTML = '';\s*\n\s*attachNoteDetailReadActions\(actionsEl\)/.test(src), |
| 22 | ); |
| 23 | }); |
| 24 | }); |
File History
2 commits
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠
2 days ago
sha256:9103f98c89257ed2b01c237cea895dabb3e85ea337dccb1161c175e4422355b6
docs: accept Calendar Events v0 spec with Phase 0 security …
Human
3 days ago