Skip to content

Count a SPARQL query it never ran like code it never ran - #254

Merged
nasser1941 merged 3 commits into
mainfrom
fix/untested-queries
Nov 6, 2026
Merged

nasser1941 merged 3 commits into
mainfrom
fix/untested-queries

Conversation

@nasser1941

@nasser1941 nasser1941 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

For #242. On 0.61.0's gate run, 2 of 3 sparql-university attempts wrote solution.sparql and said they were done without running it, and the third tried and gave up when it found no Python. All 3 failed. The check for code it never ran (#245) left query files out, so nothing sent them back.

What changes

  • A new .sparql or .rq file counts like a new code file: if no command since its last change ran it, lcode sends the model back once, to run it or to say plainly that it's untested.
  • The note adds "for a query, run it on its data". When uv is installed, it says how to run Python in a throwaway environment, and that the package for a SPARQL query is rdflib.

Left out on purpose

.sql files. One can be a migration, and asking the model to run it could change a real database. A SPARQL query rarely has that risk.

Testing

A new test covers the whole path with FakeOllama: the query is written, the model says it's done, the note sends it back once, and it runs. The full suite, ruff, basedpyright and mkdocs build --strict pass.

With a real model (qwen3.6-35b at 32K), two attempts at sparql-university on this branch: 1 of 2 passed, and it was 0/3 on each of the last two nights. Both attempts ran the query on their own, one by installing rdflib and the other from a script, so the new note never fired, and this doesn't show what the note itself does. Only the FakeOllama test covers that so far, and tonight's gate has three more attempts. Two attempts are also too few to credit this change for the pass.

This changes what the model is told, so it goes through the next gate before it ships.

🤖 Generated with Claude Code

nasser1941 and others added 3 commits November 6, 2026 13:10
On the dev slice, 2 of 3 sparql-university attempts on 0.61.0 wrote solution.sparql and said they were done without
running it. lcode now sends the model back once, and the note names rdflib. SQL files stay out: one can be a migration,
and asking to run that could change a real database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nasser1941
nasser1941 merged commit cfe7f92 into main Nov 6, 2026
12 checks passed
@nasser1941
nasser1941 deleted the fix/untested-queries branch November 6, 2026 16:58
@nasser1941 nasser1941 mentioned this pull request Nov 6, 2026
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.

1 participant