Tools break when strict-schema clients fill unset optional fields with `[]`, `""` or `0`; add a registry-wide "filler-safe" contract
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- sql, typescript
Direzione di ricerca
Start in packages/drivers/src/query-timeout.ts around lines 36-40, where query_timeout_ms: 0 disables the deadline, then check sql-materialize.ts near line 352 where max_rows already treats 0 as unset. The issue also names the sql_execute, sql_materialize and sql_check tools. Done means a contract test that walks every registered tool schema and shows that [], "", 0 and null behave like omission. The choice between null and a separate boolean for disabling needs maintainer input before any code changes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Clients that use strict JSON schemas send every property, filling unused optional ones with [], "" or 0. Individual tools have been patched one at a time, but there is no guard that "filler" behaves like an omitted field, so each new optional parameter can reintroduce the failure.
Mechanism
- Arrays with
minItems: 1reject[]; cross-field refinements (for example a limit cap tied to another parameter) reject instead of clamping. - Numeric fields where
0means "disable" turn a filler value into a behaviour change:query_timeout_ms: 0disables the safety deadline insql_execute,sql_materializeandsql_check(packages/drivers/src/query-timeout.ts:36-40).max_rowsalready treats0as unset (sql-materialize.ts:352), so the contract is inconsistent. - Past instances:
sql_checkrejections, and asql_executeoption that rejected 14-18% of calls (212 of 1,475; 422 of 2,059; 791 of 4,368; 1,528 of 8,381 in four overlapping slices), returned only the named columns on success (1,458 of 1,495 calls, causing 448 identical re-queries and 535 s), and matched names case-sensitively (69 "Unknown column" errors).
Evidence
gpt-5.6-sol sent 0 for query_timeout_ms on 41% of its SQL calls (1,095 of 2,685; 1,215 of 2,059 in another slice), and the rejected calls appeared in every session that used the affected build. Median calls per session were 30.1 vs 19.3 and median elapsed 108 s vs 72 s.
Impact
Correctness-risk and time: filler turns safety deadlines off, and rejected calls cost a turn each.
Proposed fix
- Add a contract test iterating every registered tool schema: set each optional property to
[],"",0andnulland require behaviour identical to omission. - Use
nullor a separate boolean, never0, to mean "disable". - Clamp limits instead of rejecting; match column names case-insensitively; never narrow the projection the SQL requested.
Acceptance check
The contract test passes for all tools in the registry and fails when a tool is changed to reject an empty optional array.
- Lingua principale
- TypeScript
- Stelle
- 810
- Fork
- 121
- Merge medio
- 1g 9h
- PR unite (30g)
- 88
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AltimateAI/altimate-code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
AltimateAI/altimate-code#1454 ·
I maintainer di solito rispondono entro 1 giorno
-
test: MCP tests fail when the developer's ~/.claude.json has MCP servers (HOME is not sandboxed)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
AltimateAI/altimate-code#1386 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
AltimateAI/altimate-code#1384 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
AltimateAI/altimate-code#1323 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
AltimateAI/altimate-code#1288 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di AltimateAI/altimate-code
Issue simili
-
Unsampled pageload span is profiled when profileLifecycle is 'trace' (browser UI profiling)Forse già presa @Jxxunnn l’ha presa oggi. ApertaBrowser Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
getsentry/sentry-javascript#25497 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
redhat-developer/rhdh-plugin-export-overlays#4438 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
resource: destroying a resource calls AbortController.abort() without a reason, creating an AbortError with a stack trace each timeForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea: core
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
angular/angular#71422 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
facebook/docusaurus#12739 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
vercel/ai#23537 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno