Skip to content

Repair plan revisions must remove fabricated human-requirements acknowledgements #558

Description

@wwind123

Problem

While revising #554, Codex produced a valid plan_revision JSON payload but appended:

<!-- HUMAN_REQUIREMENTS_ADDRESSED -->
### Human requirements
- Requirement 1: addressed ...

The issue had no signed -- Human Reviewer comment, so no human requirements were surfaced. The validator correctly rejected the response. The Antigravity repair pass then reproduced the same invalid marker and section.

The repair prompt is contradictory: it says that no surfaced IDs requires an empty acknowledgement set, but separately instructs plan-revision repair to preserve a human-requirements marker and section whenever the malformed original contains them. The latter wins in practice, so repair cannot resolve this deterministic formatting failure.

Expected behavior

  • Treat the active repair_surfaced_requirement_ids / direct-discussion context as authoritative.
  • For plan_state and plan_revision, when there are no surfaced signed human requirements and no required direct-discussion acknowledgement, remove any fabricated HUMAN_REQUIREMENTS_ADDRESSED marker and ### Human requirements section from the repaired output.
  • Preserve an acknowledgement only when the active repair context actually has surfaced requirement IDs or explicitly requires direct-discussion acknowledgement.
  • The repair prompt must not use a malformed response as evidence that a human requirement exists.

Regression coverage

Add a plan-revision repair fixture where an issue discusses Requirement N labels as acceptance criteria but contains no signed human comment. Seed a malformed plan revision with a fabricated acknowledgement and assert repair produces a schema-valid revision without the marker/section. Also retain coverage that genuinely surfaced signed requirements preserve their acknowledgement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions