Skip to content

fix: exclude out-of-range free-format candidates - #57

Merged
choskeli merged 5 commits into
mainfrom
fix/iso-free-format-ceiling
Oct 28, 2026
Merged

choskeli merged 5 commits into
mainfrom
fix/iso-free-format-ceiling

Conversation

@choskeli

@choskeli choskeli commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Ancillary bytes in a valid 300 kb/s free-format stream could create a competing 480 kb/s interpretation and make the parser reject the file. Apply a per-sample-rate 320 kb/s envelope before candidates contribute framing evidence: maximum unpadded spans are 1044/960/1440 bytes at 44.1/48/32 kHz, and physical spans are limited to 1045/960/1440 bytes. Check every followed frame and every later locked span. Keep the fixed 8647-byte probe budget and existing ambiguity policy.

The inclusive 320 kb/s endpoint is the documented, reasoned interpretation of detailed header semantics; this does not claim that ISO/IEC 11172-3:1993 sections 2.1.67 and 2.4.2.3 use perfectly consistent wording. Section 2.4.3.4.4 and ITU-R BS.1115-1 Appendix 2 support the Layer III maximum. No table-derived minimum or guessed padding schedule is introduced. At 32/48 kHz the maximum base cannot add padding; at 44.1 kHz it can.

Genuine 400 kb/s LAME fixtures remain rejection controls, including packaged-runtime smoke. Genuine 128/192/320 kb/s fixtures retain their positive counts. Tests and independent construction oracles cover sample rates, channels, CRC, padding, short streams, transitions, upper/first-excluded spans, raw/multipart uploads and count options. Two ambiguity controls now use genuinely in-range competing layouts. Production changes remain in free-format.ts and frame-spans.ts.

Current head: 3288542, integrated once with post-revert main 68cb260. Independent integration source review is clear: parser, tests, fuzz inputs and all 31 proof bindings are identical to the previously reviewed head; only four cache files came from main. The original assignment is unchanged.

Current-head hosted checks are pending. Local integration checks passed 1798 parser tests (one existing optional skip), 48 API tests, build and 43 corpus replay executions. Cache/policy tests passed 180/181; the unchanged executable-mode assertion fails on Windows because chmod does not change its file mode. No assertion or skip was changed. The prior exact-head evidence below is historical, not certification of the new integration.

  • Hosted CI run 40622155269: all 34 jobs passed, including Linux runtime coverage, compatibility, tooling, encoder provenance, packaged-runtime smoke, bounded-resource/fuzz checks and the complete fresh parser audit: 1305 mutants, 100% adjusted.
  • Local final-head parser/API suite: 1859 passed, two existing optional skips. Integration checks also passed 202 mutation-policy/shard tests, all 31 proof bindings, formatting, lint, TypeScript, build and 43 corpus replays.
  • Red→green: eight original regressions failed on untouched main; three padding regressions and two construction-oracle checks failed before their respective corrections. The ancillary-only competing-layout cases now count correctly.
  • Initial hosted run exposed a stale 400 kb/s smoke expectation and one survivor in a redundant early clamp. The fixture-matrix regression failed before correction, then all 48 real local HTTP fixture requests passed: 36 exact counts and 12 typed extension rejections. The duplicate clamp was removed while per-frame and locked-span enforcement remained. No new equivalence exception was added; all 31 existing identities and assumptions remain.
  • The local aggregate check encountered six Windows socket failures reproduced on untouched main. The final hosted Linux aggregate is green. No additional full local mutation campaign was run.

Independent source/spec and integration reviews are clear; normal protected merge awaits current-head required checks. #58 contains the separate short-frame correction. Indexed maximum-rate padding, same-rate indexed/free switching and broader ambiguity policies remain separate follow-ups. No CI/queue changes are included.

# Conflicts:
#	AGENTS.md
#	docs/specifications/assessment-scope.md
#	docs/specifications/conformance.md
#	docs/specifications/input-classification.md
# Conflicts:
#	docs/specifications/assessment-scope.md
#	docs/specifications/conformance.md
#	docs/specifications/input-classification.md
@choskeli
choskeli marked this pull request as ready for review October 28, 2026 03:44
@choskeli
choskeli merged commit 2e4b81c into main Oct 28, 2026
40 checks passed
@choskeli
choskeli deleted the fix/iso-free-format-ceiling branch October 28, 2026 04:06
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