<TASK>
Fresh-context consumer usability trial. Work only in a new directory <WORKDIR>.
Do not read any local project repo, installed library implementation/source, previous attempts, or other agents/conversations. Start from public https://mate4b.github.io/narrative-contracts/llms.txt and follow documentation links. Install narrative-contracts==0.1.0a3 and pytest-narrative-contracts==0.1.0a3 from PyPI in a new venv; use <PYPI_A2_VENV>/bin/python only to create your own Python3.12 venv. No models/Ollama.

Audit an existing authored inventory-allocation validator, retaining a survivor as a regression after correcting its domain logic. Implement allocation_audit.py exposing validate_before(sample), validate_after(sample), adapt_validator(validator), build_cases() tuple, and build_obligations() tuple. Supplied validator behavior: sample stock absent/None => accepted False, complete False, errors empty; type(units) is not int => accepted False, complete True, errors ['schema.units']; units > stock => accepted False, complete True, errors ['stock_exceeded']; otherwise accepted True, complete True, errors empty. Invalid STRING stock is intentionally allowed to raise TypeError during comparison for failure accounting. Missing policy is requested_zone == permitted_zone. Baseline: {'units':2,'stock':5,'requested_zone':'north','permitted_zone':'north','reply':'Two units were allocated.'}. stock and permitted_zone are independently supplied trusted evidence; other fields are requested/generated data.

Fixed campaign: above-stock VIOLATION expected stock_exceeded; wrong-zone VIOLATION expected zone_not_allowed; exact-stock and changed-wording PRESERVE controls; schema units string VIOLATION expected stock_exceeded to show unrelated schema.units rejection stays unattributed; stock=None VIOLATION expected stock_exceeded to show unknown remains in denominator; stock='unavailable' VIOLATION expected stock_exceeded to show exception remains in denominator; identical baseline/variant excluded. Include declared untested idempotency obligation. Explain authored labels, especially schema/unknown/error diagnostic cases, without claiming independent review. After adding zone_not_allowed detection in validate_after, full-campaign thresholds should still fail due to diagnostic gaps; a separately named policy-only subset of above-stock, wrong-zone and both controls should pass after fix and fail before it. Keep full corpus visible. Use pytest fixture audit_validator and retain failed audit JSON before raising. Return/report a3 versions and schema semantics accurately; no arbitrary-prose or production accuracy claims. Download and retain every public page consulted plus actual site's /build-info.json before implementation, with URL-to-path SHA256 manifest; do not replace remote build info with custom metadata. Preserve actual commands/stdout/failures and each source version if you repair it (do not create artificial failures). No edits to library/docs or commits. Report artifacts and results to parent when done.
</TASK>

Machine paths in the task were replaced with <WORKDIR> and <PYPI_A2_VENV>.
