fix/v02-patch: pr_files_diff, template_name, repo_update #26

Merged
mathias merged 6 commits from fix/v02-patch into main 2026-05-16 22:03:29 +00:00
Owner

Why

Three tied items on the v02 patch sprint — one PR.

Issues closed

  • #25 fix(pr_files_diff) — every file entry was showing the last file's diff. splitUnifiedDiff stored bytes.Buffer.Bytes() in the map and Reset()ed the buffer; the map entries aliased the shared backing array. Fix copies into a fresh slice per file. New TestPRFilesDiffPerFileIsolation asserts each file's diff contains its own header and none of the others'; verified failing on the prior code.

  • #24 fix(create_project_from_template) — template name was hardcoded at startup. Adds an optional template_name input field that overrides the server-configured default per call. No enum on the schema — server-side tmpl.Template check is the gate, so future templates (go-ml, go-service, …) drop in without redeploys. Server-configured default preserved for backward compatibility.

  • #12 feat(repo_update) — new tool for PATCH /api/v1/repos/{owner}/{name} with optional archived/description/private/website/template pointer fields. Only set fields are sent on the wire; zero-field calls return ErrValidation before any network hop. private: false is allowed but flagged in the tool description. (The ntfy confirmation hook hinted in the issue is out of scope here — that's a separate cross-cutting feature.)

Verification

  • task check green: context sync ✓, golangci-lint 0 issues, all tests with -race, govulncheck no callable vulns.
  • Regression test for #25 verified failing on prior code, passing after fix.
  • Three logical commits + one chore commit for pre-existing context-adapter drift from the upstream pgvector default change.

Followup (not in this PR)

  • ntfy confirmation hook for destructive PATCHes (private:false, archived:true reversion, etc.) — cross-cutting tool middleware.
## Why Three tied items on the v02 patch sprint — one PR. ## Issues closed - **#25 fix(pr_files_diff)** — every file entry was showing the last file's diff. `splitUnifiedDiff` stored `bytes.Buffer.Bytes()` in the map and `Reset()`ed the buffer; the map entries aliased the shared backing array. Fix copies into a fresh slice per file. New `TestPRFilesDiffPerFileIsolation` asserts each file's diff contains its own header and none of the others'; verified failing on the prior code. - **#24 fix(create_project_from_template)** — template name was hardcoded at startup. Adds an optional `template_name` input field that overrides the server-configured default per call. No enum on the schema — server-side `tmpl.Template` check is the gate, so future templates (go-ml, go-service, …) drop in without redeploys. Server-configured default preserved for backward compatibility. - **#12 feat(repo_update)** — new tool for `PATCH /api/v1/repos/{owner}/{name}` with optional `archived`/`description`/`private`/`website`/`template` pointer fields. Only set fields are sent on the wire; zero-field calls return `ErrValidation` before any network hop. `private: false` is allowed but flagged in the tool description. (The ntfy confirmation hook hinted in the issue is out of scope here — that's a separate cross-cutting feature.) ## Verification - `task check` green: context sync ✓, golangci-lint 0 issues, all tests with `-race`, govulncheck no callable vulns. - Regression test for #25 verified failing on prior code, passing after fix. - Three logical commits + one chore commit for pre-existing context-adapter drift from the upstream pgvector default change. ## Followup (not in this PR) - ntfy confirmation hook for destructive PATCHes (`private:false`, `archived:true` reversion, etc.) — cross-cutting tool middleware.
mathias added 1 commit 2026-05-16 21:17:42 +00:00
fix: merge repo_update — add archived+template, keep default_branch+confirm from main
CD / Lint / Test / Vet (pull_request) Failing after 4s
CD / Build & Import (pull_request) Has been skipped
CD / Deploy via GitOps (pull_request) Has been skipped
4122e1f2ae
mathias force-pushed fix/v02-patch from 4122e1f2ae to 3cccbfb8cb 2026-05-16 22:02:22 +00:00 Compare
mathias merged commit e31fd3f023 into main 2026-05-16 22:03:29 +00:00
mathias deleted branch fix/v02-patch 2026-05-16 22:03:29 +00:00
Sign in to join this conversation.