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.
## 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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.
splitUnifiedDiffstoredbytes.Buffer.Bytes()in the map andReset()ed the buffer; the map entries aliased the shared backing array. Fix copies into a fresh slice per file. NewTestPRFilesDiffPerFileIsolationasserts 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_nameinput field that overrides the server-configured default per call. No enum on the schema — server-sidetmpl.Templatecheck 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 optionalarchived/description/private/website/templatepointer fields. Only set fields are sent on the wire; zero-field calls returnErrValidationbefore any network hop.private: falseis 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 checkgreen: context sync ✓, golangci-lint 0 issues, all tests with-race, govulncheck no callable vulns.Followup (not in this PR)
private:false,archived:truereversion, etc.) — cross-cutting tool middleware.4122e1f2aeto3cccbfb8cb