Skip to content

feat(autopr): self-healing pipeline (issue #158) - #238

Merged
Delqhi merged 1 commit into
mainfrom
feat/issue-158-autopr
Jun 16, 2026
Merged

feat(autopr): self-healing pipeline (issue #158)#238
Delqhi merged 1 commit into
mainfrom
feat/issue-158-autopr

Conversation

@Delqhi

@Delqhi Delqhi commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Implements the autopr pipeline (classifier + PR plan renderer). 98.8% test coverage. 12/12 unit tests pass under -race. PR creation goes through the gh-bridge (M4 ask-classified) — that is a v0.1 follow-up.

Closes #158

What ships:
  - cmd/sin-code/internal/autopr/classify.go (new):
    - Class type (trivial | mechanical | non_trivial).
    - ClassifyGofmt / ClassifyMissingTest / ClassifyImport /
      ClassifyNonTrivial: 4 deterministic classifiers.
    - TrivialAndMechanical(): filters auto-fixable issues.
    - ClassFromString(): fail-closed (unknown -> non_trivial).

  - cmd/sin-code/internal/autopr/classify_test.go: 6 race-clean
    unit tests.

  - cmd/sin-code/internal/autopr/pipeline.go (new):
    - NewReport(): pure pipeline (no I/O, no LLM).
    - renderPRTitle / renderPRBody: deterministic Markdown
      output referencing issue #158 + M3 mandate.
    - renderCommands: dedup + sort, deterministic order.

  - cmd/sin-code/internal/autopr/pipeline_test.go: 6 race-clean
    unit tests covering empty, non-trivial-only, has-fixable,
    stable-titles, dedup-commands, sorted-commands.

  - cmd/sin-code/autopr_cmd.go (new):
    - sin-code autopr: 2 subcommands (run, plan).
    - JSON output for downstream CI consumers.

  - cmd/sin-code/main.go (edit): NewAutoPRCmd registered.

Acceptance criteria (from #158):
  - [x] sin-code autopr run triggers the pipeline (dry-run by
        default; --json emits the report).
  - [x] PR body is generated from the diff report (no LLM).
  - [x] Auto-fix is reversible — the pipeline does NOT call
        ghbridge; that is the caller's job behind the M4
        permission engine.
  - [x] Test coverage 98.8% of statements (target >= 80%).

Hard mandates honored:
  - M2: no new deps.
  - M3: parsePolicy fail-closed (the verify gate is sacred).
  - M4: gh pr create is ask-classified (not in this PR — the
        gh-bridge integration is a v0.1 follow-up).
  - M5: import path is github.com/OpenSIN-Code/SIN-Code/...
  - M7: 12/12 tests pass under go test -race -count=1.

Refs: #158
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-young-hobby-team-24h").

Learn More: https://vercel.com/karstenblau45-2395s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/ronaldokrause-9559s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/aragonheld-7756s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/einskarst-2238s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/mariobatrhs-9606s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-young-hobby-team-24h").

Learn More: https://vercel.com/miroblabla-2914s-projects?upgradeToPro=build-rate-limit

@Delqhi
Delqhi merged commit 7e49eaf into main Jun 16, 2026
8 of 10 checks passed
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/sagamundis-1139s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-young-hobby-team-24h").

Learn More: https://vercel.com/spriterfrau-5830s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/cristianoronalodbau-9053s-projects?upgradeToPro=build-rate-limit

@Delqhi
Delqhi deleted the feat/issue-158-autopr branch June 16, 2026 21:48
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-young-hobby-team-24h").

Learn More: https://vercel.com/manheiler-8784s-projects?upgradeToPro=build-rate-limit

@github-actions

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)
📊 Download SARIF (for Code Scanning)

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

@github-actions

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Medium findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)

Run ID: 27650352700 · Commit: ${github.sha}

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

if path == "" {
return nil, nil
}
b, err := os.ReadFile(path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v3.18 autopr] auto-PR for spec drift + format + lint fixes

2 participants