You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 81b6df2
Browse filesBrowse the repository at this point in the historyBrowse files
Addresses all unresolved review threads from coderabbitai and cubic-dev-ai
on PR #849 (feat/validator-framework).
**Critical fixes**
- `build-local-tarball.sh`: REPO_ROOT traversal depth 6→3 `..` segments
(script is at `benchmark/ade-bench/altimate_code_agent/`, 3 levels deep)
- `prompt.ts`: explicit `continue` after `validatorRetryCount++` to make
the retry loop intent unambiguous (was falling through to bottom-of-loop
`continue` correctly but implicitly)
- `prompt.ts`: `workingDirectory` now uses `Instance.directory` instead of
`process.cwd()` to match the session's actual working directory
**Major fixes**
- `altimate_code_agent.py`: `shlex.quote()` on `self._model_name` before
shell interpolation to prevent injection via model name strings
- `altimate-code-setup.sh`: `@latest` fallback replaced with `exit 1` for
benchmark reproducibility; config file now written with `chmod 600`
- `dbt-schema-verify.ts`: fail closed on errors — spawn failures now pushed
into `results` as error entries; `ok` check requires `errored === 0` so
unverifiable models don't silently pass the completion gate
- `system.ts`: XML-escape `skill.name` before embedding in
`<auto_loaded_skill name="...">` attribute via `escapeXmlAttr()`
- `system.ts`: remove `.catch(() => [])` inside `anyMatchInWorktree` so
errors propagate to the outer try/catch; `autoLoadLog.warn(...)` is now
reachable
- `registry.ts`: `appliesTo()` exceptions now surface error details as a
soft-pass result entry instead of being silently swallowed
**Minor fixes — validator-utils.ts hardening**
- `VALIDATOR_TIMEOUT_MS`: finite/positive guard against NaN, 0, or negative
env-var values (all fall back to the 60 s default)
- `modelsModifiedSince`: case-insensitive `.sql` check (`.toLowerCase()`)
for consistency with `modelNameFromPath` which already uses `/\.sql$/i`
- New `runWithConcurrencyLimit` helper (max 4 concurrent by default, env
override via `ALTIMATE_VALIDATORS_CONCURRENCY`) replaces unbounded
`Promise.all` in both `dbt-tests-pass.ts` and `dbt-schema-verify.ts`
**Docs / research corrections**
- `findings.md`: timing table row renamed "Step-to-step intervals
(start-to-start)" to clarify it includes step duration, not just gaps
- `findings.md`: f1011 description corrected — `check_option_b` FAILED
(per Appendix C), not passed
- `findings.md`: per-domain failure counts corrected (asana 4→3, f1 5→4;
total now sums to 19, consistent with headline 78-59=19)
- `dbt-unit-tests/SKILL.md`: removed untestable "empty partition" window
function guidance; replaced with partition-of-1 and tie-break row cases
- `dbt-schema-verify/SKILL.md`: fallback verification glob broadened from
`schema.yml` to `**/*.yml` to catch `_models.yml` and other conventions
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copy file name to clipboardExpand all lines: .opencode/skills/dbt-unit-tests/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ description: Generate dbt unit tests automatically for any model. Analyzes SQL l
40
40
-**`/` division** → row where the denominator is `0` or `NULL`
41
41
-**`CASE WHEN`** → at least one row matching each branch, including the implicit `ELSE NULL` if no explicit `ELSE` is set
42
42
-**`COALESCE` / `IFNULL`** → row where every argument is `NULL`
43
-
-**Window functions (`OVER`)** → an empty partition, a partition of size 1, and a row at the partition boundary
43
+
-**Window functions (`OVER`)** → a partition of size 1 (single-row group exercises rank/first/last edge cases), a row at the partition boundary, and a tie-break row (two rows with the same ORDER BY key)
44
44
-**Date arithmetic / date spines** → a row at the start of range, end of range, and a gap day with no events
45
45
-**Aggregations with `GROUP BY`** → at least one group of size 1 (often masks fan-out bugs) and one group whose key is `NULL`
46
46
-**Incremental merge keys** → both an "insert" row and an "update" row matching an existing key
? `${mismatches.length} of ${results.length} models you edited have a column-shape mismatch against schema.yml. The build may be green, but equality tests will fail.`
208
+
: `${errored} model(s) could not be schema-verified (spawn or tool errors) — schema drift cannot be ruled out. Investigate before declaring done.`
209
+
194
210
return{
195
211
ok: false,
196
-
reason: `${mismatches.length} of ${results.length} models you edited have a column-shape mismatch against schema.yml. The build may be green, but equality tests will fail.`,
212
+
reason,
197
213
fixHint:
198
-
formatFixHint(mismatches)+
199
-
`\n\nFix the model SQL to match the schema.yml spec (do not edit the spec), rebuild, and the harness will re-check before declaring done.`,
214
+
mismatches.length>0
215
+
? formatFixHint(mismatches)+
216
+
`\n\nFix the model SQL to match the schema.yml spec (do not edit the spec), rebuild, and the harness will re-check before declaring done.`
217
+
: `Run \`altimate-dbt schema-verify <model>\` manually to diagnose the error. Check that altimate-dbt is on PATH and that the dbt project compiles cleanly.`,
0 commit comments