Commit ab8a64f
authored
fix(v2): close the defects live probing found (#6681)
* fix(v2): close the defects live probing found
Staging finally deployed the merged release, so the surface could be
exercised for real. Every fix already shipped held up. These are the
defects only live traffic surfaced, plus the ones a static sweep had
found and left.
A cursor named a position in a sequence without naming the sequence.
`cursorScopeKey` hashed only the caller's filters, so any two lists
filtering on nothing but `workspaceId` produced one fingerprint and
accepted each other's tokens: a tables cursor replayed against the
knowledge list answered 200 and silently skipped a row. Table rows never
reached that check at all, so a cursor from one table paged another.
Identity now comes from the route's own contract — method plus resolved
path — because a hand-written name is the step an author forgets, and
forgetting it is invisible. An unresolved path placeholder throws rather
than fingerprinting the template, so a misconfigured route fails on every
request instead of an unlucky one. Every token minted before this is
refused with an accurate message; they are single-walk and unpersisted.
Knowledge search and the document list answered different questions.
Search grouped same-tag filters by slot and joined them with OR while the
list conjoined every filter, so `gte 9` and `lte 2` on one tag returned
nothing from the list and a full billed page from search. Search now
conjoins. The OR grouping replaced an explicit `|OR|` mechanism that was
deleted outright, was never documented in any contract, and cost the
ability to express a range on a single tag; the union it gave is still
reachable as separate searches. The search body also accepted an
unbounded query that was billed and then silently truncated to the
embedding model's window, and ignored the tag-filter cap the list
enforces.
A body over ten mebibytes was reported as malformed JSON. Next's proxy
truncates there, well under this app's fifty-megabyte ceiling, so the
parse failed on a body the caller sent whole and the size branch was
unreachable. The ceiling is now clamped to what the proxy will pass.
Also: a group's output columns accepted a `workflowGroupId` and discarded
it; an enrichment group could never gain an output, because a new output
coordinate demanded workflow metadata a group with no workflow cannot
have; `newOutputColumns` alone reported success and created nothing; a
saved view stored layout references to columns that do not exist while
refusing the same name in a filter; an MCP server stored `retries: 0` as
three and overrode an explicit auth type; a disabled server answered tool
discovery with an unclassified fault; rotating a header server's headers
left it reading connected; and a run whose workflow was deleted reported
the root folder path while also reporting the workflow deleted.
Where the honest fix was out of reach, the contract was corrected instead
of half-fixing the code: the polled run resource rebuilds `error.code` by
matching the persisted message, so it can never report the two codes that
need block attribution, and now says so. `OUTPUT_TOO_LARGE` is removed —
no path ever emitted it.
`triggers` was left alone deliberately. It reads as a closed enum but
production holds 43 distinct values, because a webhook run stores its
provider id; pinning the enum would refuse legitimate history a log
search exists to find. The description now says the vocabulary is open.
* fix(v2): clamp explicit body caps to the proxy ceiling too
The previous commit clamped the default JSON body cap but left explicit
per-route overrides alone, so a route declaring a larger `maxBodyBytes`
still fell into the truncation it was meant to report: the four inline
workspace-file routes at 70 MB and the deployed-chat route at 220 MB.
Next attaches `proxyClientMaxBodySize` to every request and clones the
body unconditionally for any non-GET method on a matched path, pushing
EOF at ten mebibytes with only a warning, so the handler reads a
truncated prefix. Those routes therefore already fail above that size —
as a malformed-JSON 400. Clamping the effective limit inside the two
body readers makes the same request fail as payload-too-large, quoting
the limit actually in force.
One existing test asserted the unreachable case, allowing a sixty-mebibyte
base64 body; it now asserts what the proxy will forward intact.
The inline-file path still advertises fifty mebibytes and cannot exceed
the proxy ceiling until that ceiling is raised, which changes buffering
for every route and belongs in its own change.
* fix(v2): close the two holes the first review round found
Both are places where a fix in this branch shut one door and left a
smaller one open in the same wall.
Letting an enrichment group gain an output meant skipping workflow
resolution — but that resolution was the only thing validating a new
output, so a PATCH began storing coordinates the runner can never fill.
It fills a cell from `result[out.outputId]` and skips an output with no
`outputId` at all, while the writer diffs on that same id and the sidebar
reads and writes by it; the contract leaves it optional. The regression
test added with that fix was itself asserting such a dead coordinate.
Create's registry checks are now two shared helpers both paths call, and
on update an output is exempt only when an identical binding already
existed, so renaming a group whose enrichment has since changed still
works while anything added or repointed must name a real output.
`mappingUpdates` on an enrichment group now says it is inexpressible
rather than resolving an empty workflow id into a missing workflow.
The layout-reference check was handed the tolerant column set, so a
placeholder minted to keep a dangling filter writable also whitelisted a
brand-new layout reference — storing an entry the next read discards,
which is the inconsistency the check was added to remove. Layout now
resolves against the live columns, which is exactly what pruning keeps,
while filters and sorts keep the exemption they need.1 parent 44524d1 commit ab8a64f
53 files changed
Lines changed: 1826 additions & 278 deletions
File tree
- apps
- docs
- sim
- app/api
- v2
- audit-logs
- billing/logs
- credentials
- custom-tools
- files
- knowledge
- [id]/documents
- lib
- logs
- mcp-servers
- secrets
- skills
- tables
- [tableId]
- query
- rows
- workflows
- [id]/runs
- workspaces/[id]/files/[fileId]/content
- executor/utils
- lib
- api
- contracts/v2
- __tests__
- server
- knowledge/search
- logs/application
- mcp
- application
- orchestration
- table
- application
- views
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | | - | |
| 731 | + | |
732 | 732 | | |
733 | | - | |
| 733 | + | |
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
| |||
2820 | 2820 | | |
2821 | 2821 | | |
2822 | 2822 | | |
2823 | | - | |
| 2823 | + | |
2824 | 2824 | | |
2825 | | - | |
| 2825 | + | |
| 2826 | + | |
2826 | 2827 | | |
2827 | 2828 | | |
2828 | 2829 | | |
| |||
2832 | 2833 | | |
2833 | 2834 | | |
2834 | 2835 | | |
2835 | | - | |
| 2836 | + | |
| 2837 | + | |
2836 | 2838 | | |
2837 | 2839 | | |
2838 | 2840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
2495 | | - | |
| 2495 | + | |
2496 | 2496 | | |
2497 | 2497 | | |
2498 | 2498 | | |
| |||
2694 | 2694 | | |
2695 | 2695 | | |
2696 | 2696 | | |
2697 | | - | |
2698 | | - | |
| 2697 | + | |
2699 | 2698 | | |
2700 | 2699 | | |
2701 | 2700 | | |
| |||
2881 | 2880 | | |
2882 | 2881 | | |
2883 | 2882 | | |
2884 | | - | |
2885 | | - | |
| 2883 | + | |
2886 | 2884 | | |
2887 | 2885 | | |
2888 | 2886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6611 | 6611 | | |
6612 | 6612 | | |
6613 | 6613 | | |
6614 | | - | |
| 6614 | + | |
| 6615 | + | |
6615 | 6616 | | |
6616 | 6617 | | |
6617 | 6618 | | |
| |||
6750 | 6751 | | |
6751 | 6752 | | |
6752 | 6753 | | |
6753 | | - | |
| 6754 | + | |
| 6755 | + | |
6754 | 6756 | | |
6755 | 6757 | | |
6756 | 6758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1423 | 1423 | | |
1424 | 1424 | | |
1425 | 1425 | | |
1426 | | - | |
| 1426 | + | |
1427 | 1427 | | |
1428 | | - | |
| 1428 | + | |
1429 | 1429 | | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
1434 | 1434 | | |
1435 | 1435 | | |
1436 | | - | |
| 1436 | + | |
1437 | 1437 | | |
1438 | | - | |
| 1438 | + | |
1439 | 1439 | | |
1440 | 1440 | | |
1441 | 1441 | | |
| |||
3882 | 3882 | | |
3883 | 3883 | | |
3884 | 3884 | | |
3885 | | - | |
3886 | 3885 | | |
3887 | 3886 | | |
3888 | | - | |
| 3887 | + | |
3889 | 3888 | | |
3890 | 3889 | | |
3891 | | - | |
| 3890 | + | |
3892 | 3891 | | |
3893 | 3892 | | |
3894 | 3893 | | |
3895 | | - | |
| 3894 | + | |
3896 | 3895 | | |
3897 | 3896 | | |
3898 | 3897 | | |
3899 | | - | |
| 3898 | + | |
3900 | 3899 | | |
3901 | 3900 | | |
3902 | 3901 | | |
| |||
4292 | 4291 | | |
4293 | 4292 | | |
4294 | 4293 | | |
4295 | | - | |
| 4294 | + | |
4296 | 4295 | | |
4297 | 4296 | | |
4298 | 4297 | | |
| |||
4303 | 4302 | | |
4304 | 4303 | | |
4305 | 4304 | | |
4306 | | - | |
| 4305 | + | |
4307 | 4306 | | |
4308 | 4307 | | |
4309 | 4308 | | |
| |||
4453 | 4452 | | |
4454 | 4453 | | |
4455 | 4454 | | |
4456 | | - | |
| 4455 | + | |
4457 | 4456 | | |
4458 | 4457 | | |
4459 | 4458 | | |
| |||
4481 | 4480 | | |
4482 | 4481 | | |
4483 | 4482 | | |
4484 | | - | |
| 4483 | + | |
4485 | 4484 | | |
4486 | 4485 | | |
4487 | 4486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
| |||
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | | - | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments