From bd798251a6f0e0a821e463aec6c111723f39fc8d Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Fri, 13 Nov 2026 05:09:00 +0000 Subject: [PATCH 1/5] [Copilot Dreaming] Remove a redundant Bazel topology description Repeating Bazel's module identity and build topology gives maintainers another description to keep aligned. MODULE.bazel already declares the module identity and internal-module override. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/MODULE.bazel#L1-L13 Standalone resolution is configured in .bazelrc. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/.bazelrc#L11-L14 The skill's Building standalone section retains the override-pair restriction, narrow stub-extension condition and internal-target prohibition. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/.github/skills/bazel/SKILL.md#L151-L174 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/skills/bazel/SKILL.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/skills/bazel/SKILL.md b/.github/skills/bazel/SKILL.md index 0352fc1c2b16..1ba3d1c92cb7 100644 --- a/.github/skills/bazel/SKILL.md +++ b/.github/skills/bazel/SKILL.md @@ -5,9 +5,6 @@ description: Conventions for editing Bazel files in the github/codeql repository # Bazel in the codeql repository -A bzlmod module named `ql`, repo name `@codeql` ([`MODULE.bazel`](../../../MODULE.bazel)). It builds standalone, and is -also consumed by an internal module; standalone builds replace that module with a stub. - ## Traps Things that will waste your time or produce a wrong edit here. Read this section even if you skip the rest. From 09ef3618afea989437ffe5f1b377e84b7706bf9d Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Fri, 13 Nov 2026 05:09:00 +0000 Subject: [PATCH 2/5] [Copilot Dreaming] Remove the repeated Bazel neighbor-copy instruction Stating the same target-copying duty twice gives maintainers two versions to keep aligned. The rest of the same bullet already requires the closest working neighbor and prefers wrappers for new code, while explaining the mixed packaging conventions. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/.github/skills/bazel/SKILL.md#L30-L31 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/skills/bazel/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/skills/bazel/SKILL.md b/.github/skills/bazel/SKILL.md index 1ba3d1c92cb7..89fca3f8c260 100644 --- a/.github/skills/bazel/SKILL.md +++ b/.github/skills/bazel/SKILL.md @@ -23,7 +23,7 @@ Things that will waste your time or produce a wrong edit here. Read this section ## Conventions -* **Copy a neighboring target rather than inventing a shape.** Packaging is not uniform: some packages use the +* Packaging is not uniform: some packages use the `codeql_*` wrappers, others still use `pkg_files` directly. Copy the closest *working* neighbor, and prefer the wrapper for new code. * **Pin anything fetched over the network** with `sha256` or `integrity`. Bazel only *warns* on an unpinned download, so From 92197b985308b72b6162558aa3f545e10d4e4f33 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Fri, 13 Nov 2026 05:09:00 +0000 Subject: [PATCH 3/5] [Copilot Dreaming] Preserve injected Rust fixes in Bazel builds A fix to injected Cargo or IDE sources can remain absent from Bazel's generator inputs, so finding the persistent edit target matters. The Bazel target excludes local src/codegen files and supplies them from the external rust-analyzer archive. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/rust/ast-generator/BUILD.bazel#L23-L50 That archive applies rust/ast-generator/patches/rust-analyzer.patch, making the tracked patch the place to retain such source changes. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/MODULE.bazel#L209-L218 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- rust/ast-generator/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/ast-generator/README.md b/rust/ast-generator/README.md index 21193bdee1c5..d98806ace6d6 100644 --- a/rust/ast-generator/README.md +++ b/rust/ast-generator/README.md @@ -13,3 +13,5 @@ bazel run //rust/ast-generator:inject-sources which will create the missing sources. Be aware that bazel will still use the source taken directly from `rust-analyzer`, not the one in your working copy. Those should not need to be update often though. + +To retain changes to injected sources in Bazel builds, update `rust/ast-generator/patches/rust-analyzer.patch`. From 7995ec2aea2024d149f67abdbbbdf2d8285dc4be Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Fri, 13 Nov 2026 05:09:01 +0000 Subject: [PATCH 4/5] [Copilot Dreaming] Remove the duplicate Unified architecture recap An introductory summary of the active language and parser backend gives maintainers another implementation description to update as the extractor evolves. Language registration already identifies Swift as the active front end. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/unified/extractor/src/languages/mod.rs#L3-L20 The parser calls swift_syntax_rs::parse_to_json and adapts its result directly. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/unified/extractor/src/languages/swift/parse.rs#L11-L21 The task-directed Swift Parser and AST Mapping sections retain parser navigation, the in-process warning, schema regeneration and test prerequisites. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/unified/AGENTS.md#L10-L32 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- unified/AGENTS.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/unified/AGENTS.md b/unified/AGENTS.md index 72de05d120be..4425cc355368 100644 --- a/unified/AGENTS.md +++ b/unified/AGENTS.md @@ -1,9 +1,5 @@ # Agent instructions -This is a CodeQL extractor that maps a language's parse tree onto a shared AST -using the `yeast` desugaring engine. Swift, the only language so far, is parsed -by Apple's swift-syntax rather than by tree-sitter. - ## Building - To build the extractor, run `scripts/create-extractor-pack.sh` From 09da864531d965d182296ae536db541cd72bd6f3 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Fri, 13 Nov 2026 05:09:01 +0000 Subject: [PATCH 5/5] [Copilot Dreaming] Remove the repeated Unified expected-file prohibition Maintainers should not have to align two versions of the same hand-edit restriction for Unified expected files. The root expected-file instruction already applies to every .expected file and includes the nonempty-testFailures safeguard. https://github.com/github/codeql/blob/d1caf2a1b4e8f0209fa7af81be129278e6dd8f56/.github/instructions/expected-files.instructions.md#L1-L4 That scoped instruction remains the prohibition's owner; Unified retains its existing runner-based update recipe. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- unified/AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified/AGENTS.md b/unified/AGENTS.md index 4425cc355368..5362d63a66ef 100644 --- a/unified/AGENTS.md +++ b/unified/AGENTS.md @@ -38,6 +38,6 @@ - To run all CodeQL tests, run `codeql test run --search-path extractor-pack ql/test` -- Do not edit `.expected` files manually. To update the expected output, pass `--learn` to the `codeql test run` command. +- To update the expected output, pass `--learn` to the `codeql test run` command. - To run a specific test, pass the specific directory to the `codeql test run` command instead of `ql/test`.