Skip to content

idea-intake.ts silently drops renter acceptanceHints/constraints when the first draft supplies its own criteria #7730

Description

@JSONbored

Context

packages/loopover-engine/src/idea-intake.ts's module comment (around line 209-210, on defaultAcceptanceCriteria) states the intended behavior unconditionally: "Fold the renter's own success signals into criteria: acceptanceHints become behavior criteria, hard constraints become constraint criteria."

In practice, defaultAcceptanceCriteria (the function that does this folding) is only invoked when draft.acceptanceCriteria is empty/absent (packages/loopover-engine/src/idea-intake.ts:190-192). When the first (index === 0) constituent-issue draft supplies its own non-empty acceptanceCriteria, the idea's own acceptanceHints/constraints are never folded in by any code path in this file — they're silently dropped from the produced task graph.

This is a real gap, not just a doc/code mismatch: test/unit/idea-intake-bridge.test.ts already has a test for "explicit draft acceptanceCriteria" (~line 196) and a separate test for "folds acceptanceHints into the first issue only" (~line 184) — but no test combines both cases, so the drop has no coverage today.

Requirements

  • When buildTaskGraph processes the first (index === 0) draft and that draft already supplies non-empty acceptanceCriteria, the idea's acceptanceHints and hard constraints must still be represented in the resulting criteria for that step — either merged alongside the draft's explicit criteria, or the module's own header comment corrected to state the override (not merge) behavior explicitly. Merge is the required fix — do not just rewrite the comment to match the current (buggy) behavior; the renter's own stated hints/constraints must not be silently discarded when a decomposition happens to also produce its own criteria.
  • Reuse the existing criteria-construction pattern this file already uses elsewhere (the same shape defaultAcceptanceCriteria produces) — do not invent a second acceptance-criteria format.
  • Scope is limited to this merge behavior for index === 0. Do not change how later drafts (index > 0) are handled — they were never in scope for hint/constraint folding per the existing tests.

Deliverables

  • buildTaskGraph/defaultAcceptanceCriteria in packages/loopover-engine/src/idea-intake.ts updated so the first draft's explicit acceptanceCriteria and the idea's acceptanceHints/constraints are both represented in the resulting criteria when both are present.
  • A new test in test/unit/idea-intake-bridge.test.ts covering the combined case (first draft has explicit acceptanceCriteria AND the idea has non-empty acceptanceHints/constraints) asserting both are present in the output.

Test Coverage Requirements

This file is under src/ via the packages/loopover-engine workspace — confirm current coverage.include scoping for this package before assuming the top-level 99% patch gate applies exactly as src/** does; match whatever this package's existing test file already does for its coverage target. The new merge branch must be covered by the new test.

Expected Outcome

A renter's acceptanceHints/constraints are never silently discarded from the produced task graph just because the first decomposed issue draft happened to also supply its own acceptanceCriteria.

Links & Resources

  • packages/loopover-engine/src/idea-intake.ts:190-192 (the branch that skips folding), :209-226 (defaultAcceptanceCriteria)
  • test/unit/idea-intake-bridge.test.ts (existing tests for each half of this case, ~line 184 and ~line 196)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions