Task — engineering-spec@1

Audits bind the normative half, not bytes the workflow rewrites

doneTASK-IMP-102
module improvement · class product · priority p1 · created 2026-07-17 · shipped 2026-07-17
depends on TASK-IMP-100 · blocks none

TASK-IMP-102: Audits bind the normative half, not bytes the workflow rewrites

Summary

An audit's byte-binding is supposed to answer one question: does this audit describe the spec on disk? Today it cannot. audited_file_sha256 covers the whole file including status and shipped - fields ship-tasks rewrites at every phase - and authoring hashes the spec before flipping status, so the audited bytes never reach a commit. Add audited_body_sha256_prefix over the NORMATIVE half (body + frontmatter minus the lifecycle-mutable fields), teach task-reconcile to prefer it, and keep the legacy field accepted so the existing corpus stays readable.

Problem

TASK-IMP-100's first live run flagged TASK-IMP-092 - shipped correctly through both human gates - as drifted. The instrument was right about the evidence and wrong about the conclusion, because the evidence it was handed cannot mean what it claims. A hash that no commit carries is the 086 class: a claim about bytes nobody can check. Every audit in the corpus carries one.

Proposed Solution

Define the normative half explicitly: the spec body plus its frontmatter minus status, shipped, routed_back_count, memory_chain_hash - everything the audit actually judged, and nothing the workflow rewrites afterwards. task-audit's contract gains audited_body_sha256_prefix (16 hex) alongside the retained audited_file_sha256_prefix, with re_entrancy and fixity_notes re-stated against the body hash - the property that is true. task-reconcile's R1 prefers the body field when present (a direct, commit-independent comparison), falls back to today's audit-commit reconstruction for legacy audits, and stops reporting a binding gap when the body field answers the question.

Alternatives Considered

Success Metrics

Scope

In scope: the task-audit contract fields, the normative-half definition, task-reconcile R1's preference order, suite arms.

Out of scope / Non-Goals

Dependencies

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

TASK-IMP-102 spec audit - audit_rubric@2.0 (machine floor + judgment)

Machine floor: task-lint clean on first pass.

Judgment: this audit is the first to carry audited_body_sha256_prefix - the field the task itself defines, computed over the normative half of the spec it audits. That is deliberate: the convention's first witness is the task that introduces it, so the corpus contains a verifiable binding from the moment the rule exists. The whole-file prefix is retained as provenance of the exact bytes read, and will stop matching the moment ship-tasks flips status - which is precisely the fact this task documents rather than hides.

Alternatives are real and distinctly rejected (post-flip hashing still breaks on the second transition; relocating status inverts STATUS-REFERENCE §1's priority; corpus rewriting falsifies history). Metrics carry baseline (100 percent unverifiable) and a suite-asserted target. Legacy readability is a stated guardrail, not an afterthought.

ISSUE ISS-001 (QA-004, wontfix-info): AC 4 is a recorded-grep prose contract (accepted pattern, TASK-IMP-090 AC 1).

SUMMARY verdict: pass issues_open: 0 issues_human: 0 next_action: ship

§gate-log

Populated during implementation (ship-tasks testing phase).