Skip to content

Enhancement: emit structured warning codes for degrade-and-continue paths #277

Closed

Description

@vibgrate-team

Context

Several vg paths warn and continue (unknown optional lockfile fields, parse degradation, skipped subtrees). Human-readable warnings are helpful, but CI and assistants need stable machine-readable warning codes they can assert on without scraping prose. Codes must stay deterministic and must never include secrets.

What to do

  1. Inventory degrade-and-continue warning sites in build/scan/report.
  2. Attach a stable short code (e.g. VG_WARN_…) to each user-facing warning in human and JSON/stderr summaries where applicable.
  3. Document the small initial code set; keep codes additive and stable once published.
  4. Tests assert codes on at least two paths.

Acceptance

  • Warnings carry stable codes in machine-readable output
  • No secrets in codes or messages; deterministic
  • Docs list the initial set; DCO

Activity

  1. added
    enhancement
    on Sep 25, 2026
  2. vibgrate-team commented on Oct 3, 2026

    @vibgrate-team
    ContributorAuthor

    Spec notes for implementers

    Goal. Machine-readable, stable warning codes on degrade-and-continue paths so CI/agents assert on codes instead of scraped prose.

    Suggested shape. Short additive codes, e.g. VG_WARN_LOCKFILE_UNKNOWN_FIELD, VG_WARN_PARSE_DEGRADE, VG_WARN_SKIPPED_SUBTREE. Emit on stderr summaries and any JSON warning channel already used by build/scan/report. Codes once published stay stable; new sites get new codes.

    Inventory first. Walk warn-and-continue sites in build/scan/report (lockfile optional fields, tree-sitter parse degradation, skipped subtrees) and attach codes without changing success/failure semantics.

    Acceptance. At least two paths covered by tests asserting the code string; docs list the initial set; no secrets in codes or messages; deterministic order when multiple warnings fire.

    Related. Pairs with #270 (unknown optional lockfile fields) and #312 (coalescing identical parse-degrade warnings) — land codes so those issues can reuse them.

  3. added a commit that references this issue on Oct 8, 2026
    c64fffe
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions