G8 — Static-library (.a / .lib) stance¶
Registry: UC-ARCH-static-lib (by_design_excluded)
Effort: S (decision) → M (if implemented) · Risk: low
Problem¶
Static/import library archives are now a documented non-goal. A user pointing
abicheck at a .a/.lib gets an explicit guidance error instead of a late or
misleading parse failure.
Goal & acceptance criteria¶
Decision gate — choose one and make it explicit:
- (A) Out of scope: document
.a/.libas a non-goal ingoals.md+concepts/limitations.md, and have the CLI emit a clear, actionable error when handed an archive ("extract members and compare the resulting objects/shared library instead"). Flip the registry entry toby_design_excludedwith anote. - (B) Support link-time API checking: iterate archive members and analyse the union of their symbol/type surface.
Acceptance for (A) (recommended first step):
- [x] goals.md non-goals and limitations.md mention static archives.
- [x] Handing a .a/.lib to dump/compare produces a clear error (not a
traceback or a misleading "not a valid binary").
- [x] Registry entry → by_design_excluded.
Acceptance for (B) (only if pursued):
- [ ] ar-member iteration produces an AbiSnapshot over the archive's union
surface; compare works on two .as.
- [ ] An example fixture + ground_truth.json entry.
Design¶
- Detection:
abicheck/binary_utils.py::detect_binary_formatreturnsNonefor archives today. Add archive detection (!<arch>\nmagic) so the service layer can branch deliberately rather than failing late. - (A) Error path:
service.resolve_inputraises aValidationErrorwith guidance when the input is an archive. - (B) If implemented: a small
arreader (stdlibarpython-style, or shell out toar t/ar xguarded per the no-shell=Truerule) feeding each member object through the existing ELF/COFF/Mach-O object path; union the surfaces. Note objects carry no SONAME/dynamic section, so only symbol/type-level kinds apply — verdict semantics need a documented caveat.
Files & surfaces¶
abicheck/binary_utils.py(archive detection),abicheck/service.py(branch/raise),docs/development/goals.md,docs/concepts/limitations.md.- (B only)
abicheck/dumper.py(member iteration),examples/.
Tests¶
- (A) Unit: archive input → clear
ValidationError. - (B) Integration: build a
.a, dump/compare.
Out of scope¶
Thin archives / ar with extended naming edge cases unless (B) is chosen.