Skip to content

skills: teach skills about LIR schema and scalar function registry - #38930

Open
mgree wants to merge 3 commits into
MaterializeInc:mainfrom
mgree:update-skill-with-func-registry
Open

mgree wants to merge 3 commits into
MaterializeInc:mainfrom
mgree:update-skill-with-func-registry

Conversation

@mgree

@mgree mgree commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Motivation

Teach skills about the new registries.

#38868
#37814

Description

New registries place new demands on the code we build; we need to have the various agents know about them.

Verification

haha 😅

@mgree
mgree requested a review from a team as a code owner September 18, 2026 14:59
@def-

def- commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

QA LLM Review

1. MEDIUM -- func_registry regenerate-before-bump silently clobbers the shipped version's digest

.agents/skills/mz-commit/SKILL.md:59

The first bullet makes REWRITE=1 cargo test -p mz-compute-types --test func_registry the immediate response to any registry failure, including "removed, or has a changed property"; the bump-first requirement only shows up two bullets later. A rewrite run before the bump overwrites the shipped version's entry in func_registry_digests.json with the new properties' digest, and nothing fails afterwards, so the record of what the shipped LIR version's functions meant is lost.

Details

Mechanism: the REWRITE branch in src/compute-types/tests/func_registry.rs:228 does digests.insert(version, digest(&properties)) keyed on the current LIR_VERSION, so a pre-bump rewrite replaces "1" rather than adding "2". Bumping afterwards and rewriting again leaves {"1": <new>, "2": <new>}. The checking path only asserts digests.get(&version) for the current version, so the corrupted entry is never revisited. That entry is the only key back into git history for the old version's properties (func_registry.json is rewritten in place, unlike lir_v{N}.json), which is exactly what the digests file exists for.

The test's own failure message orders it the other way round: bump, "so ... version N's digest in ... stays as it is", then regenerate. The LIR section of this same skill gets the ordering right at line 43. .agents/skills/mz-test/SKILL.md:36 inherits the same inverted order.

Fix: put the version decision ahead of the command in bullet 1, e.g. "If the failure names removed or changed functions, settle the LIR_VERSION question below before running REWRITE. A rewrite at the old version overwrites that version's digest entry instead of adding a new one, and no later check catches it."

@mgree
mgree requested review from bosconi and removed request for a team September 18, 2026 16:03
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