Skip to content

[inline-learn lib 3/3] Add direct MakeTest inline learning - #23013

Open
d10c wants to merge 2 commits into
d10c/multi-query-ql-reconciliationfrom
d10c/direct-ql-maketest-learning
Open

d10c wants to merge 2 commits into
d10c/multi-query-ql-reconciliationfrom
d10c/direct-ql-maketest-learning

Conversation

@d10c

@d10c d10c commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What problem does it solve?

Inline-expectation learning needs to work for direct test .ql queries that use MakeTest, not only for .qlref tests with a postprocessor.

Why is the problem a problem?

Direct tests have no .qlref ownership metadata or postprocessing stage. Without an explicit direct-query protocol, they cannot emit source edits while preserving their ordinary result relations.

How does the solution work?

Direct learning plans emit the same six-column learnEdits relation consumed by the test runner. Exact main-schema recognition avoids treating metadata or @id queries as edit producers. Shared edit emission is reused, while direct and postprocessing plans remain separate because their discovery, identity, output, and reconciliation contracts differ.

Why does the solution solve the problem?

The direct query computes edits from its own MakeTest expectations and returns them through the runner's established relation shape. Ordinary query results remain available for expected-output comparison.

Why is this a good solution?

It adds direct support without pretending that direct queries and tagged .qlref cohorts have interchangeable membership semantics. Mixed or multiple producers can therefore be rejected safely until a generalized source-owner contract is designed.

Testing

Python and Java library fixtures cover direct edit generation and ordinary result preservation. They were exercised with plain, learn, repeated-learn, and plain verification runs.

Stack: follows #23012 in Stack #23015.

@d10c
d10c added this pull request to stack #23014 November 4, 2026 12:42
@d10c
d10c removed this pull request from stack #23014 November 4, 2026 12:45
@d10c
d10c added this pull request to stack #23015 November 4, 2026 12:45
@d10c d10c changed the title d10c/direct ql maketest learning Add direct MakeTest inline learning Nov 4, 2026
@d10c
d10c requested a dynamic review from Copilot November 4, 2026 12:46

This comment was marked as resolved.

@d10c d10c changed the title Add direct MakeTest inline learning [inline-learn lib 3/3] Add direct MakeTest inline learning Nov 4, 2026
@d10c
d10c force-pushed the d10c/direct-ql-maketest-learning branch from 2a07a02 to ae1a0d7 Compare November 4, 2026 14:01
d10c and others added 2 commits November 12, 2026 16:24
Expose the learnEdits protocol from direct MakeTest queries without relying on query metadata or @id. Share edit emission with qlref postprocessing while restricting direct reconciliation to safe line-comment syntax and leaving unsupported forms for verification.

Add Python and Java fixtures covering custom expected tags, foreign tags, standard tags, and missing query IDs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e860263a-9e7b-4451-8b4a-3b5d119a962c
Require generated expectation atoms to round-trip through the inline grammar before emitting an edit. Let language implementations reject unsafe end-of-line appends, and conservatively disable Python appends where explicit continuation lines cannot be distinguished at this seam.

Cover unsafe hash, whitespace, newline, and Python continuation cases through the public learnEdits relation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1adfa307-c48e-43f5-94e3-8286e4a8c083
@d10c
d10c force-pushed the d10c/direct-ql-maketest-learning branch from ae1a0d7 to 4b761ab Compare November 12, 2026 16:03
@d10c
d10c marked this pull request as ready for review November 12, 2026 16:08
@d10c
d10c requested review from a team as code owners November 12, 2026 16:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants