Skip to content

test(validation): the mistyped-lookup case declares its shape with dims - #460

Merged
FBumann merged 1 commit into
mainfrom
claude/ecstatic-goodall-0sr271
Sep 14, 2026
Merged

FBumann merged 1 commit into
mainfrom
claude/ecstatic-goodall-0sr271

Conversation

@FBumann

@FBumann FBumann commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Prompt: ci failed #459

Note

The following content was generated by AI.

What this changes

One parametrize case in tests/test_validation.py still declared a constraint's shape with foreach. It now declares dims, like the other eight cases in the block. This turns main's CI green, and with it the red CI on the release PR #459 (which only bumps the version).

Why

#429 renamed a constraint's shape key from foreach to dims but missed this case, so the closed schema refused it for unknown key 'foreach' before the where lookup was resolved — and the assertion the case exists for ('lkk' not found / Lookups: ['lk']) never ran. CI has been red on main since #429 merged.

Verified: tests/test_validation.py passes all 239 (Python 3.13, runtime deps installed by hand). Did not run the full pixi run ci gate — pixi.sh is blocked by this environment's egress proxy, so pixi could not be installed.

The failure on the broken tree, and the fix

CI on both main and #459:

FAILED tests/test_validation.py::TestValidateExpressions::test_a_bad_declaration_is_refused_at_load[a-mistyped-lookup-in-a-where-lists-the-lookups]
  assert "'lkk' not found" in "constraints.cap: unknown key 'foreach' in a constraint declaration. Valid keys: description, dims, expression, where."

The change:

-    {'constraints': {'cap': {'foreach': ['g'], 'where': 'lkk', 'expression': 'p <= c'}}},
+    {'constraints': {'cap': {'dims': ['g'], 'where': 'lkk', 'expression': 'p <= c'}}},

After it, run directly (pixi unavailable):

239 passed, 1 warning in 0.98s

foreach appears nowhere else as a stale key — the only other occurrence is the test name test_the_emitted_foreach_follows_declaration_order, about the mathematical ∀, whose body already uses dims.

🤖 Generated with Claude Code

https://claude.ai/code/session_015VTJgAdeTzXM6gRCW39VNT


Generated by Claude Code

This case still declared the constraint's shape with `foreach`, so the
closed schema refused it for an unknown key before the `where` lookup was
ever resolved, and the assertion on the lookup listing never ran. It now
declares `dims`, like every other case in the block, and reaches the
"'lkk' not found / Lookups: ['lk']" refusal it is written for.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VTJgAdeTzXM6gRCW39VNT
@FBumann
FBumann enabled auto-merge (squash) September 14, 2026 12:03
@FBumann
FBumann merged commit cfc5312 into main Sep 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants