Skip to content

Seeding fix 2/4: covered-term guarantee skip (C2) — generic nouns stop spawning redundant hub seeds #41

Closed

Description

@filipechagas

Parent

#37 — implements change C2 of the consolidated spec.

What to build

Asking "what code uses to charge a customer" no longer explodes: a query term that an already-picked seed's normalized label plainly matches (the scorer's own weakest-tier predicate) claims no additional guaranteed seed, because it is not starved — the guarantee's stated purpose. On the fixture, the generic-noun hub and the method-name decoy are no longer seeded, the traversal stays bounded, and all three callers render. The behavior is a keyword-only, default-off parameter on the seed picker, opted into only by the query pipeline, layered after the existing label-dedup gate in the existing sorted-term order.

Refined invariant this encodes: every term with any match is matched by at least one seed (previously: every term's own singleton winner gets a slot).

Acceptance criteria

  • Red-first: the generic-noun phrasing test fails on current v8 (hub seeded, node count explodes), passes after C2
  • "what code uses to charge a customer" end-to-end: no hub seed, node count bounded, all 3 fixture callers rendered
  • Picker-seam invariant test: a covered term is skipped; an uncovered starved term is still recovered (the starvation protection provably survives)
  • Default-off: picker behavior byte-identical for every caller that does not opt in
  • All existing seeding sentinels green with zero baseline edits

Blocked by

Activity

  1. added
    ready-for-agent
    on Aug 6, 2026
  2. filipechagas commented on Aug 6, 2026

    @filipechagas
    CollaboratorAuthor

    Implemented on feat/seeding-fix-37 @ cebf231 + 635db73 (merged at ebe7b67).

    All acceptance boxes green:

    • Red-first: generic-noun phrasing test fails at the branch point (hub seeded: ['ChargeCustomerService', 'ChargeCustomerService.charge()', 'coder.md', 'Customer']), passes after C2 — red state independently reproduced by an adversarial reviewer from a clean archive.
    • "what code uses ChargeCustomerService to charge a customer" e2e on the fixture: hub not seeded, 22 → 10 nodes, 3/3 callers rendered; boundedness asserted against the pre-C2 seed list's own traversal (verified non-tautological by the reviewer).
    • Picker-seam invariant: covered term ("customer") skipped, genuinely starved term ("code") still recovered — starvation protection provably survives.
    • Default-off: no-flag call byte-identical (the guard refactor was proven behavior-identical at the AST level by the adversarial review); only _query_graph_text opts in.
    • Sentinels: tests/test_serve.py 129 passed unmodified (incl. label dedup and guarantee-cannot-reintroduce-dupe), bench equality gate holds.

    Review round 2 (adversarial finding, fixed in 635db73): the coverage predicate originally reused _seed_label_key, whose or nid tail let a labelless (norm_label == "") seed declare terms covered via node-id substrings — a match the scorer never makes — starving the term's winner. Fixed with a label-only _seed_norm_label closure (dedup gate untouched), pinned by test_coverage_is_judged_on_the_seed_label_never_its_node_id (red against cebf231, green after).

    Full suite on the merged head: 4,177 passed; only the 4 documented pre-existing test_ollama_retry_cap.py env failures (missing openai).

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

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions