Repository navigation
fix(abom): config-only .github has nothing to analyze; shortened-commit example links - #68
Open
data-douser wants to merge 3 commits into
Open
data-douser wants to merge 3 commits into
data-douser wants to merge 3 commits into
Conversation
…it example links
- A repository whose .github holds only secret scanning, code scanning
or Dependabot configuration is "nothing to analyze" rather than a
`codeql database create` that exits 32. Actions content is now what
the actions extractor indexes by default (indexedByDefault), the same
list code scanning reuse compares against.
- The "no commit on its default branch" reason no longer carries git's
raw `fatal: You are on a branch yet to be born` text.
- A linked query-request example may name a commit by its first 7 to 40
hex characters, as GitHub's blob view links one. The ref question
asks `object(expression:)` after branch and tag; uses-ref polling does
not, since Actions refuses a shortened SHA in `uses:`.
- Run results keep the space between two sentences Razor rendered
joined ("octo/docs.Not covered").
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 23, 2026
The C# self-audit started failing on unchanged code in mid-November with three findings in Razor components: identical values compared at ActionVersions.razor:115 and two fields "missing" readonly in DiscoveryControls.razor that are reassigned elsewhere. Both are artifacts of the database, not of the code. Build-mode none fetches every referenced package that has no compile assets again, at its newest version, and takes the assemblies inside as references. DevServer is such a package; its newest release now carries ASP.NET Core 11 assemblies, which outranked the 10.0 ones the app and MudBlazor build against. Template contexts went untyped, so `onLines.Analyzed` and `onLines.Commits` both became accesses to an unknown member. - Drop the DevServer reference. Nothing runs `dotnet run` or `dotnet watch`; `abom serve` hosts the published interface. - State `@namespace Abom.WebAssembly` in _Imports.razor. CodeQL runs the Razor generator without the project file, so components landed in ASP.Shared and every `@using Abom.WebAssembly.*` failed; the real build's generated code is unchanged. Reproduced with CodeQL 2.27.3 on Linux: 1,882 compiler errors and the false positive before, 30 errors and no findings after. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
With the interface's own references fixed, the C# self-audit still reported two missed readonly modifiers in DiscoveryControls.razor that the code does not have. The 2026-11-16 runner image carries .NET SDK 11.0.100 beside 10.0.404, and build-mode none generates Razor components with the newest SDK it finds. .NET 11's generator writes a <Component>_razor.decl.g.cs beside each component holding the whole @code block; the extractor compiles every file the generator wrote, so each field is declared twice and the copy nothing binds to reads as assigned only by its initializer. setup-dotnet now installs into a directory of its own, holding only the SDK the interface builds with. Reproduced on Linux with CodeQL 2.27.3: 10.0.404 and 11.0.100 together give the two findings; 10.0.404 alone gives none. CodeQL 2.27.4 and 2.27.5 note no change here. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
data-douser
marked this pull request as ready for review
November 23, 2026 03:17
Copilot stopped reviewing on behalf of
data-douser due to an error
November 23, 2026 03:17
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
4 open issues
The abbreviated-SHA regex only matches lowercase hex. GitHub SHAs are hex and may be represented in… · New The fake implementation for commit-prefix resolution keeps overwritingfound, so if multiple… · New The error fromindexedByDefaultis discarded without explanation. Since this function determines… · New RemovingMicrosoft.AspNetCore.Components.WebAssembly.DevServercan break common local workflows… · New
What changed in this PR
This PR improves correctness and robustness around linked GitHub blob examples and CodeQL/Actions analysis edge cases, while also addressing UI text rendering and CodeQL build tooling quirks.
Changes:
- Allow resolving GitHub blob links that use abbreviated commit SHAs (≥7 hex chars) by querying refs “as commit” when appropriate.
- Tighten what counts as “Actions content” to match what the CodeQL Actions extractor indexes by default, preventing false failures for repos with only non-Actions YAML in
.github/. - Fix Razor-rendered run summary spacing and adjust UI/CodeQL build configuration to avoid type-generation issues.
| File | Description |
|---|---|
| ui/tests/Abom.WebAssembly.Tests/HeldResultsTests.cs | Adds an assertion covering Razor whitespace concatenation behavior. |
| ui/_Imports.razor | Sets an explicit Razor namespace to keep CodeQL-generated components resolving @usings correctly. |
| ui/Shared/RunResults.razor | Forces spacing between adjacent <span> elements in rendered run summaries. |
| ui/Abom.WebAssembly.csproj | Removes the DevServer package reference to avoid CodeQL/SDK assembly precedence issues. |
| internal/serve/requestexamples_test.go | Adds test coverage for blob links that contain abbreviated commit SHAs. |
| internal/serve/requestexamples.go | Ensures blob-link ref resolution is allowed to treat candidates as commits. |
| internal/expand/checkout_test.go | Adds coverage for “Actions content” detection and improves the “no commit” error wording expectations. |
| internal/expand/checkout.go | Aligns “Actions content” detection with extractor-indexed content and adjusts error wording for unborn branches. |
| internal/catalog/refs_test.go | Extends the fake GraphQL server and adds tests for abbreviated commit resolution behavior. |
| internal/catalog/refs.go | Implements OrCommit support, abbreviated-SHA detection, and commit fallback resolution in ref queries. |
| docs/architecture.md | Documents abbreviated-commit link behavior and the refined “Actions content” definition. |
| .github/workflows/self-audit.yml | Pins the .NET install directory to avoid SDK/version mismatch issues during self-audit. |
Review effort: Lite
| } | ||
|
|
||
| // abbreviated is a commit as a link may name it: seven hex digits or more. | ||
| var abbreviated = regexp.MustCompile(`^[0-9a-f]{7,40}$`) |
Comment on lines
+69
to
+73
| for _, c := range repo.commits { | ||
| if len(prefix) >= 7 && strings.HasPrefix(c, prefix) { | ||
| found = commitObject(c) | ||
| } | ||
| } |
| return nil | ||
| }) | ||
| return found | ||
| files, _ := indexedByDefault(dir) |
Comment on lines
+15
to
20
| <!-- No DevServer: `abom serve` hosts the interface. It has no compile assets, so CodeQL's | ||
| build-mode none fetched it again at its newest version, and that version's ASP.NET Core | ||
| assemblies outranked these and left every MudBlazor template untyped. --> | ||
| <ItemGroup> | ||
| <PackageReference Include="Markdig" Version="1.4.0" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.1" /> |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Purpose
Small fixes that stand on their own:
Important changes
.githubholding only configuration is "nothing to analyze". Secret scanning, code scanning or Dependabot configuration alone no longer triggers acodeql database createthat exits 32. "Actions content" now means what the actions extractor indexes by default.fatal:text.uses:references are unaffected, since Actions refuses a shortened SHA there.mainsince .NET 11 shipped.Microsoft.AspNetCore.Components.WebAssembly.DevServerreference is dropped. Build-mode none fetched it again at its newest version, whose ASP.NET Core 11 assemblies left MudBlazor templates untyped._Imports.razorstates@namespace Abom.WebAssembly, so CodeQL generates components in their real namespaces. The real build's output is unchanged.Notes