Skip to content

Define recovery for an agent name whose discovery coverage remains unresolved #592

Description

@pengfei-threemoonslab

Found while implementing #543; deferred rather than treating every missing name as a human declaration.

What was observed

The bounded #543 classifier can distinguish readable names confined to tests/templates from a selectable product declaration. It cannot make that distinction when the parse is capped, manifest scope is ambiguous, or some Python files were not parsed. cli/discovery/signals.py::_parse_python_facts drops read/decoding/syntax failures; a real fixture containing a readable test Agent plus invalid Python has python_parse_truncated: false but workspace_signals.python_file_count < python_file_total.

Doctor recomputes discovery when agent.name is unresolved, but has no --max-python-files option. A higher-cap detect command followed by unchanged doctor would repeat the same cap. The #543 regressions therefore refuse to classify incomplete discovery as test/template-only and do not offer that unusable retry; the broader unresolved case retains existing placeholder recovery.

This leaves a real recovery question: a generic request to replace CHANGE_ME does not tell the caller whether to repair a source, select a project, provide a supported declaration, or ask a person. Dynamic names, unresolved imports and low-quality literals also lack a positively established cause. Setup permissions remain all false; this is not an observed authorization bypass.

Follow-up

  • Settle the recovery vocabulary from parser/discovery facts, without matching rationale or exception prose.
  • Make any capped retry consumable by the command that reruns the decision; do not create a detect/doctor loop.
  • Preserve exact manifest scope and product-backed coding-agent recovery. Do not make all unresolved names human-owned.
  • Specify how a discovery answer handles files changing between its reads before claiming generation-consistent evidence; Preserve why agent.name is unresolved through init and doctor recovery #543's invocation-local facts are not a verifier snapshot.

Acceptance

  • Incomplete, unreadable and unsupported name evidence produces a truthful next step naming the missing evidence or decision.
  • Any offered automated retry makes bounded progress when executed as emitted.
  • Paired product/test, capped, invalid-Python and cross-module cases keep ranked actions and compact control consistent.
  • No synthetic product identity, broader setup permissions or hidden coverage claim is introduced.

Related: #543 owns the known test/template-only slice; #328 covers failure attribution. No new public field or command is assumed by this issue.

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

    P2Queued; valuable but not blockingarea:agent-modeAgent-mode contract: control envelope, next actions, command stringsarea:initinit / detect / manifest generation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions