Skip to content

Feature: auto-detect codegen/schema issues from real usage and (opt-in) auto-file GitHub issues #60

Description

@cultron

Motivation

Real-world usage surfaces CLI/codegen defects that pass validate_schema but fail at runtime — e.g. #59 (uuid PK generated with no generation strategy → every insert fails). Catching these today requires a human to notice the runtime failure, diagnose it, build a minimal repro, and file manually. That loop is slow, and most users won't do it — so defects go unreported and unfixed.

Request

An opt-in capability (a CLI "skill", also exposed as an MCP tool) that detects when the CLI produces inaccurate or poor output during normal commands and can automatically open a well-formed GitHub issue against apsoai/cli, grounded in the real usage that triggered it — with user consent.

Detectable-signal examples

  • A generated entity that cannot satisfy its own constraints on insert (NOT NULL PK with no generation strategy / no default — exactly primaryKeyType: "uuid" generates a non-generated @PrimaryColumn() → every insert fails with null id #59).
  • validate_schema passes but apso dev / runtime errors (validation ↔ runtime divergence).
  • Codegen emitting unused imports, dead decorators, or asymmetric branches (e.g. serial generates a PK strategy but uuid doesn't).
  • Migration diffs that fail against the PGlite sandbox.
  • Schema features silently ignored (e.g. nullable dropped on enum fields).
  • Repeated runtime errors correlated with a specific generated artifact.

Behavior / guardrails

  • Opt-in (--report-issues flag or config) — schemas/data may be sensitive.
  • Sanitize/redact schema + data; include only a minimal repro, versions, and the offending command/artifact.
  • Dedupe against existing issues (search first; comment rather than duplicate).
  • Explicit confirmation before opening — especially via the MCP tool.
  • Auto-attach environment (apso --version, OS, node), the relevant .apsorc excerpt, and the generated snippet.

Integration

  • A CLI command (e.g. apso doctor --report) and an MCP tool (report_issue / diagnose) so AI agents driving apso can auto-file with the user's OK.

Value

Closes the loop between real usage and CLI quality. Defects like #59 would be detected and filed automatically from actual usage instead of relying on a user to notice, diagnose, and hand-write the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions