Skip to content

Plan Approval: fingerprint blocks on a complete Testing Contract (D) #1378

Description

@SaRedfiche

Part of #1374.

Problem

The fingerprint binds the code-generation plan, which embeds a ## Testing Contract JSON block produced by aidlc-testing-posture.ts render. If render is still running or wrote a partial contract (a backgrounded testing-posture render & fed a PARTIAL Testing Contract on the stalled customer run), parseTestingContract returns null, contractValid is false, and the approval is refused later with:

Plan Approval fingerprint does not match the active intent, target, stage attempt, plan, instructions, and Testing Contract. Re-run the fingerprint command, re-present the plan, and approve again.

The fingerprint command will happily fingerprint a plan whose Testing Contract is incomplete, so the failure surfaces only at the gate.

Verbatim error string(s) addressed

  • Plan Approval fingerprint does not match the active intent, target, stage attempt, plan, instructions, and Testing Contract. Re-run the fingerprint command, re-present the plan, and approve again.
  • Plan Approval requires the current Testing Contract (planApprovalQuestionEvidence, core/tools/aidlc-testing-posture.ts)

Proposed behavior

Before fingerprinting, require a COMPLETE Testing Contract. If testing-posture render is still running or the embedded contract is incomplete/partial, refuse with a distinct message:

Testing Contract still rendering — wait for render to complete (or re-run it synchronously) before fingerprinting.

Options: make render synchronous by contract, or gate the fingerprint on a render completion marker so a partial ## Testing Contract can never be fingerprinted.

Acceptance criteria

  • fingerprint refuses with the "Testing Contract still rendering / incomplete" message when the embedded contract is partial or absent, instead of fingerprinting it.
  • A complete, current Testing Contract fingerprints exactly as today.
  • The guard invariant is unchanged; this only moves the incomplete-contract detection from the gate to fingerprint time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions