Skip to content

Qualify exact loader map rejection and retain every case result - #12

Merged
ErzenXz merged 2 commits into
mainfrom
codex/boot-map-admission-coverage
Oct 13, 2026
Merged

ErzenXz merged 2 commits into
mainfrom
codex/boot-map-admission-coverage

Conversation

@ErzenXz

@ErzenXz ErzenXz commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

The loader had a live descriptor-version proof, while other decoder failures lacked exact guest qualification. Seven new fixtures cover invalid stride/length, empty and over-capacity maps, page-count overflow, alignment and overlap after the real firmware exit. Each requires its specific production decoder error before kernel entry; bounded stack-backed fixtures issue no post-exit allocation or boot-service call.

The harness now retains failed case manifests and continues the remaining cases before failing the overall run. Negative tests reject missing, duplicate, wrong-case, wrong-error and wrong-phase evidence, and inject a first-case timeout to prove later cases still run. CI's existing loader-version context runs all eight loader cases; the other five handoff contexts and repository policy names remain unchanged.

Validation: all 13 loader/handoff cases passed on clean a2e810e, all 177 Python tests passed, and docs, unsafe inventory and frozen checklist checks pass. Evidence and exact limits are recorded in docs/VERIFICATION.md. This advances F1.1 qualification but leaves firmware map-growth, stale exit-key retry and allocation-failure tests open. Checklist remains 53/100 and GenOS remains Experimental.

This PR targets main after #11 merged with all 83 required checks passing. The branch was rebased onto the identical integrated tree; its file tree is unchanged from local qualification. This boot qualification change needs its own remote checks.

Summary by Sourcery

Expand boot-memory qualification to cover exact loader map rejection outcomes and retain evidence across the complete loader test group.

New Features:

  • Expand loader admission qualification with seven exact decoder-error cases covering malformed descriptor metadata, empty and over-capacity maps, range overflow, alignment, and overlap.
  • Add a loader-admission test mode that runs the complete loader case group while retaining evidence for every case.

Bug Fixes:

  • Ensure malformed loader maps are rejected with the expected error and before kernel entry.
  • Continue executing later qualification cases after an individual case fails while preserving the failed case manifest.

Enhancements:

  • Strengthen boot evidence validation against missing, duplicate, wrong-case, wrong-error, and wrong-phase results.
  • Keep the existing handoff CI contexts and required-check policy unchanged while assigning the loader-version context to the full loader group.

CI:

  • Update CI to run all loader admission cases in the existing loader-version context.

Documentation:

  • Document the expanded loader/map qualification scope, retained evidence behavior, exact rejection requirements, and remaining F1.1 gaps.
  • Record the loader qualification results and evidence while keeping the roadmap checklist and experimental status unchanged.

Tests:

  • Add harness coverage for exact decoder errors, real exit/decoder preservation, bounded fixture constraints, and continued execution after an injected first-case timeout.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR broadens boot-memory qualification from a single loader-version proof to eight loader admission cases, using production decoder paths with bounded post-exit fixtures and exact error/phase evidence. The harness now retains every case manifest, continues after failures, and aggregates the final result, while CI, tests, and documentation are updated without closing the remaining firmware map-growth, stale-key retry, or allocation-failure gaps.

Sequence diagram for loader admission qualification and retained case results

sequenceDiagram
    participant CI
    participant Harness
    participant Fixture
    participant Loader
    participant Kernel

    CI->>Harness: test_boot_memory.py --loader-admission
    loop Eight loader admission cases
        Harness->>Fixture: apply bounded post-exit input
        Harness->>Loader: decode_uefi_map
        alt Exact BootMemoryError and rejection phase
            Loader-->>Harness: BootMemoryError
            Harness->>Harness: retain case manifest
        else Wrong error, phase, case, or missing evidence
            Loader-->>Harness: admission failure
            Harness->>Harness: retain failed manifest
        end
        Harness->>Harness: continue to next case
    end
    Harness-->>CI: aggregate result after all cases
    Harness--x Kernel: no kernel entry for loader rejection
Loading

File-Level Changes

Change Details Files
Expanded loader admission qualification with exact decoder-error and rejection-phase evidence for malformed map inputs.
  • Added seven bounded, stack-backed fixtures for stride, length, empty, capacity, range, alignment, and overlap failures.
  • Validated exact case/error ordering and prohibited kernel entry or post-exit allocation/firmware activity.
  • Ran the complete loader-admission group from the existing loader-version CI context.
tools/test_boot_memory.py
tools/test_boot_memory_harness.py
.github/workflows/ci.yml
CONTRIBUTING.md
docs/MEMORY.md
docs/VERIFICATION.md
ROADMAP.md
Changed boot-memory orchestration to retain evidence for failed cases and continue executing the remaining cases.
  • Records failed manifests and serial hashes instead of aborting at the first failure.
  • Reports per-case success or failure and raises an aggregate failure after all selected cases finish.
  • Added harness coverage for first-case timeout retention and subsequent-case execution.
tools/test_boot_memory.py
tools/test_boot_memory_harness.py
docs/VERIFICATION.md
Strengthened negative evidence validation for loader qualification.
  • Rejects missing, duplicate, wrong-case, wrong-error, reordered, and wrong-phase evidence.
  • Ensures loader rejection occurs before kernel initialization and rejects forged continuation markers.
  • Documents retained artifacts, exact limits, CI scope, and remaining firmware lifecycle gaps.
tools/test_boot_memory.py
tools/test_boot_memory_harness.py
docs/MEMORY.md
docs/VERIFICATION.md
CONTRIBUTING.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Base automatically changed from codex/roadmap-parser-coverage to main October 13, 2026 11:58
@ErzenXz
ErzenXz force-pushed the codex/boot-map-admission-coverage branch from 5a4e6ac to a9280b3 Compare October 13, 2026 11:59
@ErzenXz
ErzenXz marked this pull request as ready for review October 13, 2026 12:07
@ErzenXz
ErzenXz merged commit a46df04 into main Oct 13, 2026
84 checks passed
@ErzenXz
ErzenXz deleted the codex/boot-map-admission-coverage branch October 13, 2026 12:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T12:10:26.861435Z a9280b3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a9280b390e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
mkdir -p build
python3 tools/test_boot_memory.py --case "${{ matrix.case }}" 2>&1 | tee build/boot-memory-run.log
if [ "${{ matrix.case }}" = loader-version ]; then
python3 tools/test_boot_memory.py --loader-admission 2>&1 | tee build/boot-memory-run.log

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Give the grouped loader run an aggregate timeout

When several loader cases hang, this command cannot fulfill the new guarantee that all later cases are attempted and their manifests retained: each of the eight cases can spend the default 120 seconds in boot() (and up to 600 seconds building), while the entire boot-memory-admission job at line 324 is capped at 15 minutes, including dependency installation. Eight boot timeouts alone require 16 minutes, so GitHub Actions will cancel the job before the loop and artifact-upload step finish. Increase the job timeout or assign bounded per-case timeouts that fit the aggregate budget.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant