feat(artifacts): inspect Classic Mac OS PEF (Joy!peff) containers and loader tables offline #15140
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.52) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #15140"
general
weight: 0.35
mvanhorn
Summary
Classic Mac OS PowerPC and 68k CFM applications, shared libraries, and extensions ship in Apple's Preferred Executable Format (
Joy!peffcontainer header with architecture tagpwpc/m68k, section headers, and aloadersection carrying imported libraries, imported symbols, exported symbols, and relocation tables). Today REA does not recognize PEF containers, soinspect-artifactcannot enumerate PEF sections or loader symbol tables andextract-artifactcannot pull raw code/data sections offline.This adds an offline
apple-pefartifact format.inspect-artifactandextract-artifactparse theJoy!peffcontainer header and section table, decode loader imported libraries, imported/exported symbols, entry-point vectors (main/init/term), and relocation counts without applying relocations or executing code, and extract stored section bytes safely inside the output directory. No issue exists for this; it is a read-only offline format addition within the supported contribution scope.Problem and expected behavior
Use case: given a Classic Mac OS
.pefbinary, inspect its container architecture (pwpcorm68k), section kinds/alignments/sizes, entry-point sections, imported libraries and symbols, exported symbols, and relocation counts offline, and extract stored sections into a contained output directory.Change and scope
src/domain/applePef.ts(withapplePef.fixture.tsandapplePef.test.ts) usingBinaryReaderto parse the 40-byteJoy!peffcontainer header, 28-byte section headers, andloadersection tables (imported libraries, imported symbols, exported hash/key/symbol tables, entry points, and relocation header counts) under bounded ceilings.src/artifacts/ApplePefArtifactReader.ts(with unit and boundary tests) and registeredapple-pefacrossartifactFormats.ts,artifactFormatRecognition.ts,artifactFormatMetadata.ts,artifactGraph.ts,targetFormats.ts,ArtifactReader.ts,artifactInventoryView.ts,appleMetadata.ts(or owning metadata module),scripts/ci/scopes.mjs, andscripts/verify/fixed-ceiling-registry.json..agents/skills/reverse-engineer-anything/and.cursor-plugin/skills/reverse-engineer-anything/.pidata) runtime sections into memory images, applying relocations, parsing MacBinary/Resource Fork wrappers, or executing binaries.Follow the contribution scope. Not applicable for target execution/injection scope decisions: this is a strictly read-only offline file parser.
Contract and boundary impact
src/domain/applePef.tsowns allJoy!peffheader, section, and loader table parsing;ApplePefArtifactReaderand inventory views consume the parsed facts directly.inspect-artifactandextract-artifactgainapple-pefrecognition, section/loader inventory, and bounded section extraction.pidataor unapplied relocations and preserves truncation or ceiling limitations visibly.docs/public/product-catalog.json), package, or installation impact: authored skill text updated in.agents/skills/reverse-engineer-anything/and.cursor-plugin/skills/reverse-engineer-anything/; no generated build outputs committed.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
ApplePefArtifactReader, boundary/ceiling/truncation checks, format recognition, target vocabularies, and standalone artifact provider integration (151/151 tests passed).inspect-artifactdid not recognizeJoy!peffcontainers or decode PEF loader symbol/import tables. Synthetic fixtures cover validpwpccontainers with loader tables, truncated headers/sections, invalid loader indices, ceiling exhaustion, and extraction containment.node scripts/rea.mjs inspect-artifactandextract-artifactagainst syntheticClassicApp.pef(385 B); observedroot_format: apple-pef,coverage: complete, decoded section and loader tables, and 4 extracted entries withcontainment_verified: true.Boundary and lifecycle regressions: reader boundary tests and standalone artifact provider tests verify bounded reads, loader table ceilings, truncation handling, and extraction containment.
For evidence-bearing changes:
Validation performed
npm run test:focusedacross all 6 PEF/recognition/vocabulary/standalone test files — 6/6 files, 151/151 tests passed.npm run verify:test-discovery— passed across 4085 test files.npm run check— passed (typecheck, lint, format:check, knip, metadata:check, verify:architecture-guards across 3333 files, knip:production, lint:typed).npm run docs:check— passed.node scripts/rea.mjs inspect-artifact/extract-artifacton syntheticClassicApp.pef— verifiedapple-pefinventory, loader tables, and contained extraction.Compatibility, safety, and release
apple-pef).BinaryReaderpositional parsing with ceilings registered infixed-ceiling-registry.json, extraction containment verification, and no relocation application or code execution.AI was used for assistance.
Author readiness
Human owner: @mvanhorn
Author checklist (completed by the PR author before requesting review)
type(scope): outcome.REA_runtime setting with a default, floor, and maximum, unless a fixed ceiling has a stated reason. See Adding a runtime setting.Demo
!demo
<video src="https://mvanhorn.github.io/pr-demo-assets/rea/2026-11-29-102-feat-classic-macos-pef-container/out.mp4" controls width="720"></video>