Commit 1f6b8bb
test(mcp): gate CONNECT_AGENT_PAGE on canonical expression envelopes (#12345)
packages/mcp is the third package shipping a raw-literal Page that reaches the
kernel through its own manifest bundle, and the only one without the
canonical-expression-envelope gate the other two carry. CONNECT_AGENT_PAGE
authors zero expression keys today, which is the argument for the gate rather
than against it: the hazard is the NEXT predicate added to it, which would ship
bare with every authoring-time signal green.
Thin gate copying the cloud-connection shape: the shared detector from
@objectstack/lint, the @objectstack/lint devDependency, and an anchored vitest
source alias appended to this package's existing alias array so the gate judges
lint's SOURCE rather than a possibly-stale dist. Population is discovered by
export shape over src/ through the shared maskComments, never by a hard-coded
name, with a floor so a scan that reads nothing cannot pass as a clean page, and
a phantom-comment pin so comment-shaped text cannot delete a page from it.
Door 3 has one recorded exemption: mcp:connect-agent is a console-registered
widget with no ComponentPropsMap row, the same standing-exemption shape
cloud-connection's two widgets were in before #11575 gave them rows. The
exemption is asserted exactly, its bag is pinned empty, and a non-vacuity pin
reds if the type ever stops appearing on the page.
The cross-package maskComments import is declared in
scripts/cross-package-test-inputs.mjs and hashed by a matching
@objectstack/mcp#test entry in turbo.json.
Claude-Session: https://claude.ai/code/session_01UjM2ia8Av1v5NqfqQEQmC6
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9646cdb commit 1f6b8bb
6 files changed
Lines changed: 451 additions & 0 deletions
File tree
- packages/mcp
- src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
36 | 48 | | |
37 | 49 | | |
| 50 | + | |
38 | 51 | | |
39 | 52 | | |
40 | 53 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
447 | 462 | | |
448 | 463 | | |
449 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
| |||
0 commit comments