Skip to content

[Copilot Dreaming] Avoid misleading test runs and remove duplicate guidance - #23175

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/dream-curate-memories-20261120050426
Open

Copilot wants to merge 3 commits into
mainfrom
copilot/dream-curate-memories-20261120050426

Conversation

@Copilot

Copilot AI commented Nov 20, 2026

Copy link
Copy Markdown

🧠 How this helps Copilot

Selecting a query directly when regenerating expectations can omit its reference's postprocessing and introduce external source paths into snapshots. Naming the postprocessing reference as the learning entry point helps Copilot avoid that invocation mistake.

Unified tests can encounter an incompatible extractor schema even for tests-only changes. Giving the local rebuild and pack-selection recovery helps Copilot complete runtime validation instead of stopping at compilation.

Unified's repeated manual-edit prohibition gives maintainers an extra copy to keep aligned. Removing that duplicate avoids the upkeep because the same readers already receive the more complete shared expected-file policy.

Review commit by commit for each change's rationale and evidence.

Note

Copilot Dreaming curates this repository's Copilot instructions and skills in the background, proposing updates to help agents work here. Learn more about Copilot Dreaming.

Automated details

Source: curate-memories Dream, analyzing main at f7a381fd5a8e.

copilot-dreamer[bot] added 3 commits November 20, 2026 05:04
…tions

Selecting a query directly can omit the normalization declared by its test reference and put external source paths into a learned snapshot. Directing expectation regeneration through the postprocessing reference avoids that invocation detour without replacing inline-failure inspection.

The Rust DataFlowStep reference selects external-location postprocessing, whose shared implementation replaces external paths while retaining result relations.
https://github.com/github/codeql/blob/f7a381fd5a8eee235dda7f83dd1f81e0a109e3f0/rust/ql/test/library-tests/dataflow/local/DataFlowStep.qlref#L1-L2
https://github.com/github/codeql/blob/f7a381fd5a8eee235dda7f83dd1f81e0a109e3f0/shared/util/codeql/util/test/ExternalLocationPostProcessing.qll#L18-L30
…schemas

Tests-only changes can encounter a database schema incompatible with the checkout libraries, even though no extractor source was edited. Giving the local rebuild and pack-selection recovery at that decision point avoids a source-selection detour and incomplete compilation-only validation.

The checkout builder generates the schema and library with its built extractor and installs that schema and binary into the local pack. Rebuilding after extractor edits remains required.
https://github.com/github/codeql/blob/f7a381fd5a8eee235dda7f83dd1f81e0a109e3f0/unified/scripts/create-extractor-pack.sh#L11-L25
Maintaining two copies of the same manual-edit prohibition gives maintainers another rule to keep aligned without changing the action for Unified snapshot edits. The file-scoped instruction already covers every Unified expected file and supplies the more complete failure-section policy.
https://github.com/github/codeql/blob/f7a381fd5a8eee235dda7f83dd1f81e0a109e3f0/.github/instructions/expected-files.instructions.md#L1-L4

The prohibition continues to apply through that shared instruction. The local learning recipe and the separate corpus-output restriction remain in Unified guidance.
@Copilot
Copilot AI requested a review from a team as a code owner November 20, 2026 05:04
Copilot AI adaptive review requested due to automatic review settings November 20, 2026 05:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified, and the changes are limited to clarifying Unified test recovery and expected-output regeneration guidance.

No open issues 🎉

What changed in this PR

Updates repository guidance to make Unified test recovery and expected-output regeneration more accurate while removing duplicated manual-edit instructions.

Changes:

  • Documents rebuilding the Unified extractor pack when tests encounter incompatible schemas.
  • Clarifies that postprocessing .qlref files should be used with codeql test run --learn.
  • Removes redundant .expected editing guidance from Unified-specific instructions.
File Description
unified/​AGENTS.md Updates Unified extractor rebuild and test recovery instructions while removing duplicated expected-file guidance.
.github/​instructions/​expected-files.instructions.md Adds shared guidance for regenerating expectations through postprocessing .qlref files.

Review effort: Lite (adaptive)

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