Skip to content

Stack misdetected as 'angular' in pure-Python repo; 5 retries all failure_class 'unknown', no strategy rotation #80

Description

@wesleysimplicio

Stack misdetected as "angular" in a pure-Python repo — 5 consecutive pipeline failures, all classified failure_class: "unknown"

Problem

Running against wesleysimplicio/simplicio-loop (a stdlib-Python repo: pyproject.toml, scripts/*.py, hooks/*.py, zero JS/TS beyond none at all), simplicio-dev-cli recorded the target stack as "angular" and burned 5 attempts on the same target, every one failing with failure_class: "unknown".

Evidence

.simplicio/runs.jsonl in the simplicio-loop repo (2026-06-23):

{"ts":"2026-06-23T21:10:22Z","model":"","provider":"claude","prompt_variant":"default","mode":"pipeline","attempt":1,"ok":false,"failure_class":"unknown","tokens_estimated":1110,"target":"hooks/headroom_dashboard.py","stack":"angular"}
{"ts":"2026-06-23T21:10:28Z","model":"","provider":"claude","prompt_variant":"default","mode":"pipeline","attempt":2,"ok":false,"failure_class":"unknown","tokens_estimated":959,"target":"hooks/headroom_dashboard.py","stack":"angular"}
{"ts":"2026-06-23T21:10:35Z","model":"","provider":"claude","prompt_variant":"default","mode":"pipeline","attempt":3,"ok":false,"failure_class":"unknown","tokens_estimated":982,"target":"hooks/headroom_dashboard.py","stack":"angular"}
{"ts":"2026-06-23T21:10:41Z","model":"","provider":"claude","prompt_variant":"default","mode":"pipeline","attempt":4,"ok":false,"failure_class":"unknown","tokens_estimated":1006,"target":"hooks/headroom_dashboard.py","stack":"angular"}
{"ts":"2026-06-23T21:10:46Z","model":"","provider":"claude","prompt_variant":"default","mode":"pipeline","attempt":5,"ok":false,"failure_class":"unknown","tokens_estimated":1002,"target":"hooks/headroom_dashboard.py","stack":"angular"}

Three independent smells in one log:

  1. Stack detection wrong: target is hooks/headroom_dashboard.py (a .py file) in a repo with pyproject.toml at root, yet stack: "angular". Whatever heuristic ran (marker files? cached global default? previous-repo bleed-through?) it ignored both the file extension of the target and the repo manifest. Wrong stack ⇒ wrong skill-router prompt, wrong test harness ⇒ the 6-layer contract can't pass.
  2. failure_class: "unknown" × 5: the failure classifier extracted nothing actionable from 5 identical failures. Even "stack/test-harness mismatch" would have been diagnosable from attempt 1 (running an Angular verify against a Python file).
  3. Retry loop without strategy change: 5 attempts, same prompt_variant (default), same mode, ~same token cost, ~6s apart — no escalation, no variant rotation, no early abort on repeated identical failure.

Also: model: "" is empty in every row — either a logging gap or the model was never resolved; either way it makes the ledger less useful for debugging.

Proposed fix

  1. Stack detection: when the edit target is *.py or the repo root has pyproject.toml/setup.py and no angular.json/package.json, resolve stack python. If detection comes from a cache, key it by repo path and invalidate on manifest change. Log the detection source (stack_source: "angular.json" | "cache" | "default") in runs.jsonl so future misdetections are one-glance diagnosable.
  2. Failure classifier: add a class for harness/stack mismatch (verify command not applicable to target language) so it can't hide under unknown.
  3. Retry policy: on N (e.g. 2) consecutive failures with identical failure_class AND identical prompt_variant, rotate variant or abort with a diagnostic instead of burning the full attempt budget.
  4. Ledger: populate model (or log why it's unresolved).

Acceptance criteria

  • Running against a repo with pyproject.toml and a .py target logs stack: "python" (test with a fixture repo).
  • stack_source recorded in runs.jsonl.
  • Harness/stack mismatch produces a named failure_class, not unknown.
  • Identical-failure retries rotate strategy or abort early (test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions