Skip to content

refactor: compact kernel headers below 7000-line budget#361

Merged
netkeep80 merged 2 commits into
netkeep80:mainfrom
konard:issue-360-d3d39e18ace4
Apr 26, 2026
Merged

refactor: compact kernel headers below 7000-line budget#361
netkeep80 merged 2 commits into
netkeep80:mainfrom
konard:issue-360-d3d39e18ace4

Conversation

@konard

@konard konard commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #360.

  • Compact the tracked include/pmm/** kernel subtree from 8794 to 6947 lines, below the new blocking 7000 line budget.
  • Preserve include anchor headings while removing blank-line bulk and consolidating repeated template boilerplate in block field traits and small PMM accessors.
  • Align scripts/check-repo-guard-rollout.sh with the same 7000 line size rule already present in repo-policy.json.
  • Regenerate single_include/pmm/pmm.h from the compacted modular headers.

Change Contract

change_type: chore
scope:
  - include/pmm/**
  - single_include/pmm/pmm.h
  - scripts/check-repo-guard-rollout.sh
  - tests/test_issue352_kernel_subtree_size.cpp
  - changelog.d/20260426_140000_issue360_kernel_compaction.md
budgets:
  max_new_files: 1
  max_new_docs: 0
  max_net_added_lines: 130
must_touch:
  - include/pmm/block_field.h
  - include/pmm/persist_memory_manager.h
  - include/pmm/forest_domain_mixin.inc
  - scripts/check-repo-guard-rollout.sh
  - tests/test_issue352_kernel_subtree_size.cpp
must_not_touch:
  - docs/**
  - README.md
  - CHANGELOG.md
  - .github/**
  - demo/**
  - examples/**
  - benchmarks/**
expected_effects:
  - Tracked include/pmm kernel source is below the 7000-line size rule.
  - Existing include anchor headings remain valid.
  - The rollout checker validates the same aggregate threshold as repo-policy.json.
  - Single-header artifacts are refreshed from the compacted modular headers.

Reproduction

  • Before the fix, ctest --test-dir build -R test_issue352_kernel_subtree_size --output-on-failure failed with 8794 <= 7000.
  • After the fix, git ls-files 'include/pmm/**' | xargs wc -l reports 6947 total.

Verification

  • cmake --build build --target test_issue352_kernel_subtree_size
  • ctest --test-dir build -R test_issue352_kernel_subtree_size --output-on-failure
  • cmake --build build
  • ctest --test-dir build --output-on-failure (94/94 passed)
  • bash scripts/check-repo-guard-rollout.sh
  • bash scripts/check-docs-consistency.sh
  • GITHUB_BASE_REF=main bash scripts/check-changelog-fragment.sh
  • tracked clang-format check matching CI exclusions
  • tracked source file-size check (<=1500 lines)
  • bash scripts/generate-single-headers.sh --output-dir /tmp/generated-pmm-issue360 plus diff -qr single_include/pmm /tmp/generated-pmm-issue360
  • git diff --check HEAD~1..HEAD

Local note: cppcheck is not installed in this runner, so local cppcheck was not run.

konard added 2 commits April 26, 2026 13:08
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: netkeep80#360
@konard konard changed the title [WIP] Сжатие кода refactor: compact kernel headers below 7000-line budget Apr 26, 2026
@konard
konard marked this pull request as ready for review April 26, 2026 13:27
@konard

konard commented Apr 26, 2026

Copy link
Copy Markdown
Contributor Author

Solution summary

Implemented and pushed the issue 360 fix.

PR 361 is updated and ready for review: #361

Key changes:

  • Reduced tracked include/pmm/** from 8794 to 6947 lines, below the 7000 budget.
  • Preserved include anchor headings; test_issue354_include_anchors passes.
  • Consolidated repeated block-field/accessor template boilerplate.
  • Aligned scripts/check-repo-guard-rollout.sh with the 7000 rule.
  • Regenerated single_include/pmm/pmm.h.
  • Removed the scaffold .gitkeep.

Verification:

  • Local ctest --test-dir build --output-on-failure: 94/94 passed.
  • Local size regression now passes: 6947 <= 7000.
  • GitHub CI for PR 361 is fully green, including cppcheck, matrix builds, sanitizers, single-header freshness, docs, changelog, and repo-guard.
  • Worktree is clean.

This summary was automatically extracted from the AI working session output.

@konard

konard commented Apr 26, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $23.295694

📊 Context and tokens usage:

  • 18.4M / 1.1M (1751%) input tokens, 38.1K / 130K (29%) output tokens

Total: (354.9K + 18.0M cached) input tokens, 38.1K output tokens, $23.295694 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (49410KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Apr 26, 2026

Copy link
Copy Markdown
Contributor Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@netkeep80
netkeep80 merged commit 45b6266 into netkeep80:main Apr 26, 2026
19 checks passed
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.

Сжатие кода

2 participants