Skip to content

refactor(mega): fold the mega engine into lib/mega/#276

Merged
tieubao merged 4 commits into
masterfrom
refactor/lib-mega-folder
Jul 18, 2026
Merged

refactor(mega): fold the mega engine into lib/mega/#276
tieubao merged 4 commits into
masterfrom
refactor/lib-mega-folder

Conversation

@tieubao

@tieubao tieubao commented Jul 18, 2026

Copy link
Copy Markdown
Member

ID-287 sanctioned slice: move lib/{mega.sh,mega-report.py,mega-review.py} into lib/mega/ (registry mega module + ADR-0034 target), re-anchor internal paths, repoint every live ref (bin/mega, board.sh, orchestrate.sh, 3 test suites, registry, README). The 4 ADR-0034 'deliberate orphans' (adopt/explain/pitch/precedent) + onboard-detect are deferred pending a maintainer taxonomy ruling (detailed in the batch report). 717/717 meta, 487/487 hooks, 30/30 bin-forwarders. Proof: docs/verification/lib-mega-folder.md. No board edits.

tieubao added 4 commits July 18, 2026 21:41
ID-287, the sanctioned slice. Move the three mega-goal scripts from lib/ root
into a cohesive lib/mega/ module (registry already registers a `mega` module;
ADR-0034 names lib/mega/mega.sh + bin/mega as the target). They move as a unit
because they call each other by same-dir path.

- git mv lib/{mega.sh,mega-report.py,mega-review.py} -> lib/mega/
- re-anchor the root-assuming internal paths one level up: mega.sh's telemetry
  source, mega-review.py's gate/ + learn/ joins (same-dir mega.sh/.py calls stay)
- repoint every live ref: bin/mega forwarder, lib/board/board.sh, lib/queue/
  orchestrate.sh, the three test suites, module-registry.md, + a lib/mega/ README
  row. Historical records untouched.

The other four loose files (adopt/explain/pitch/precedent) are ADR-0034
"deliberate orphans"; foldering them conflicts with that ADR (a source-of-truth
call) and is deferred. 717/717 meta, 487/487 hooks, 30/30 bin-forwarders, all
mega suites green.

Proof: docs/verification/lib-mega-folder.md.
Apply the review note (security + fable): mega.sh's header framed the file as a
deliberate orphan awaiting promotion, and mega-review.py's _SELF_DIR comment said
"lib/ ... orphan file"; this branch performed the promotion, so both now describe
the lib/mega/ module. Comments only, no behavior change.
Apply the ID-287 review-team findings:
- test-coverage (HIGH): cmd_report's re-anchored telemetry source had zero
  red-on-wrong coverage (the mega-report tests call python directly, bypassing
  the bash launcher; the one bin/mega report call passed no slug). Add an
  end-to-end `bin/mega report demo` launcher assertion; verified load-bearing
  (broken anchor -> 15/17, restored -> 17/17).
- architecture (LOW): docs/consumer-contract.md's bin/mega -> lib/mega.sh row
  was stale post-move (a live onboarding ref, not historical) -> lib/mega/mega.sh.
@tieubao
tieubao merged commit 425bf3a into master Jul 18, 2026
2 checks passed
@tieubao
tieubao deleted the refactor/lib-mega-folder branch July 18, 2026 15:11
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