fix(architecture): make the trusted kernel evaluate real heads - #298
Merged
Conversation
added 2 commits
August 19, 2026 20:38
The kernel added in PR #295 never successfully evaluated a PR head: the workflow could not fetch the head (fixed in the transition PR), and the evaluator itself then crashed — discoverFiles ran 'git ls-files' in the materialized head directory, which is not a git repository. Fixes, verified end-to-end against the real PR #296 head: - discoverFiles walks the materialized tree (filesystem only); the evaluator never needed git inside the head directory. - classifyFiles implements the canonical '**' remainder-role rule from loadArchitecturePolicy: the remainder role must be last and claims only files no earlier role claimed. The kernel's stricter rule misclassified 119 files on a real head. - The kernel now shares the canonical compileGlob instead of its own divergent variant ('src/**/x' must also match 'src/x'). New tests pin the remainder-role semantics and the not-last error.
Skill-Harvest: none
Owner
Author
Owner
Author
|
approve-architecture 2cc5b47 |
Owner
Author
|
approve 2cc5b47 |
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.
Summary
The trusted kernel added in PR #295 has never successfully evaluated a PR head. The workflow could not fetch the head (fixed in #297), and the evaluator itself then crashed:
discoverFilesrangit ls-filesinside the materialized head directory, which is not a git repository. Everytrusted-kernelfailure so far — including the current red on PR #296 — traces to this.Fixes (verified end-to-end against the real PR #296 head: passes with approval, fails closed with only the protected-paths error without):
discoverFileswalks the materialized tree (filesystem only); the evaluator never needed git inside the head directory.classifyFilesimplements the canonical**remainder-role rule fromloadArchitecturePolicy(remainder must be last, claims only files no earlier role claimed). The kernel's stricter rule misclassified 119 files on a real head.compileGlobinstead of its divergent variant (src/**/xmust also matchsrc/x).New tests pin the remainder-role semantics and the remainder-not-last error.
Skill harvest
none — the applicable lesson (identify which side of the PR supplies a failing check's code) was already recorded in #297's
.skills/fixing-regressions-with-ciupdate.Known red check (bootstrap, last one)
trusted-kernelwill fail on this PR: the check runs the default branch's kernel, which still contains the bug this PR fixes. After merge, the main-side kernel is fully functional and will evaluate PR #296 for real.Owner approvals
Copy each line into a separate PR comment below (both bind the exact head SHA and expire when the head moves):
Change impact declaration