Skip to content

Commit cbbaacd

Browse files
authored
Merge pull request #278 from morluto/agent/cleanup-hotspot-audit
Harden bounded cleanup workflows
1 parent 8a70ad7 commit cbbaacd

107 files changed

Lines changed: 2955 additions & 826 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ jobs:
207207
' <<<"$metadata"
208208
- name: Publish npm package
209209
run: npm publish --provenance --access public
210+
- name: Verify npm publication is publicly discoverable
211+
shell: bash
212+
env:
213+
VERSION: ${{ inputs.release_tag || github.ref_name }}
214+
run: node scripts/verify-npm-publication.mjs "${VERSION#v}"
210215
- name: Attach npm package to GitHub release
211216
env:
212217
GH_TOKEN: ${{ github.token }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.1.0"
2+
".": "2.0.0"
33
}

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## [2.0.0] (2026-08-09)
4+
5+
### ⚠ BREAKING CHANGES
6+
7+
* **mcp:** `github.search_threads` and `github.read_source_files` now require
8+
`repository: {owner, repo}`. Flat `owner` and `repo` request fields are no
9+
longer accepted. See [the v2 MCP migration guide](docs/mcp-v2-migration.md).
10+
11+
### Features
12+
13+
* **mcp:** add optional repository scope to authored pull-request portfolios.
14+
15+
### Bug Fixes
16+
17+
* **mcp:** return host-neutral native resource links for durable artifacts.
18+
319
## [1.1.0](https://github.com/morluto/gitcontribute/compare/v1.0.0...v1.1.0) (2026-08-08)
420

521

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ filesystem locks, job ownership, or cancellation:
6464
make test-race
6565
```
6666

67+
The focused race lane defaults to four in-package test slots. On a constrained
68+
machine, lower only that setting without reducing the package-level race
69+
coverage, for example `make test-race RACE_TEST_PARALLELISM=2`.
70+
6771
The SQLite driver is pure Go. Keep CGO-disabled compatibility when changing
6872
storage or build dependencies.
6973

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ GOTESTSUM ?= $(shell command -v gotestsum 2>/dev/null || printf '%s/bin/gotestsu
1717
# use more than the historical four-test cap.
1818
TEST_PARALLELISM ?= 8
1919
TEST_PACKAGE_PARALLELISM ?= 8
20+
RACE_TEST_PARALLELISM ?= 4
2021
INTEGRATION_PARALLELISM ?= 4
2122
GOTESTSUM_FLAGS ?= --rerun-fails=2 --rerun-fails-max-failures=5
2223

@@ -79,12 +80,12 @@ test-uncached:
7980
test-race:
8081
# Keep package-level overlap for cross-package race coverage while bounding
8182
# in-process test concurrency for the CPU-heavy SQLite tests.
82-
$(GO) test -short -race -p=4 -parallel=2 -timeout 600s ./internal/app ./internal/corpus ./internal/workspace
83+
$(GO) test -short -race -p=4 -parallel=$(RACE_TEST_PARALLELISM) -timeout 600s ./internal/app ./internal/corpus ./internal/mcpserver ./internal/workspace
8384

8485
test-race-full:
8586
# Keep package-level overlap for cross-package race coverage while bounding
8687
# in-process test concurrency for the CPU-heavy SQLite tests.
87-
$(GO) test -race -p=4 -parallel=2 -count=1 -timeout 900s ./...
88+
$(GO) test -race -p=4 -parallel=$(RACE_TEST_PARALLELISM) -count=1 -timeout 900s ./...
8889

8990
test-verbose:
9091
$(GO) test -short -v -p=$(TEST_PACKAGE_PARALLELISM) -parallel=$(TEST_PARALLELISM) -timeout 120s ./...
@@ -143,4 +144,4 @@ test-integration:
143144

144145
check: fmt-check test lint-changed
145146

146-
verify: fmt-check test-uncached lint-full tidy-check generate-check docs-check
147+
verify: fmt-check vet test-uncached lint-full tidy-check generate-check docs-check

docs/architecture.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ known zero merge rate remains distinct from an unknown rate.
138138

139139
Pull-request portfolios use the ordinary repository and thread projections.
140140
`github.sync_pull_request_portfolio` is the only public portfolio producer. Its
141-
discriminated selection is either authored discovery or an explicit bounded
142-
set; identity lookup, authored discovery, and scalar status refresh are
141+
discriminated selection is either authored discovery (optionally scoped to one
142+
repository) or an explicit bounded set; identity lookup, authored discovery,
143+
and scalar status refresh are
143144
internal phases rather than separately advertised operations.
144145
REST `pr_details` and `pr_reviews` facets are combined with typed GraphQL
145146
facets for checks, unresolved review threads, detailed merge state, merge queue,
@@ -398,10 +399,11 @@ live GitHub request
398399
-> local resources/read
399400
```
400401

401-
`github.search_threads` persists the returned issue or pull-request
402+
`github.search_threads` accepts a required nested repository reference and persists the returned issue or pull-request
402403
observations and an exact `github-thread-search.v1` result artifact. A search
403404
page never advances repository-wide thread coverage and an empty page is not
404-
proof that no matching live thread exists. `github.read_source_files` resolves
405+
proof that no matching live thread exists. `github.read_source_files` accepts
406+
the same required nested repository reference, resolves
405407
one named ref to a commit, reads bounded repository-relative files in input
406408
order, and stores a `source-bundle.v1` artifact. Commit SHA is the authoritative
407409
revision; GitHub blob SHA remains a separate file identity. Source content is

docs/mcp-composed-workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ revision authority and are not treated as GitContribute execution results.
103103
## Contribution collision checks
104104

105105
```text
106-
github.search_threads (bounded current work)
107-
github.sync_pull_request_portfolio(selection=authored) -> jobs.get
106+
github.search_threads(repository={owner,repo}, bounded current work)
107+
github.sync_pull_request_portfolio(selection=authored, repository={owner,repo}) -> jobs.get
108108
corpus.search_pull_requests | corpus.find_pull_request_overlaps
109109
workspace.check_merge_conflicts (only after explicit acquisition)
110110
```

docs/mcp-scalable-workflows.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ merge details, checks, files, and other children require explicit facets.
4040
`github.read_source_files` resolves a ref once and reads up to 20 ordered
4141
repository-relative files with per-file and total-byte limits. Its immutable
4242
source-bundle resource records the resolved commit and blob provenance.
43+
Both live repository acquisitions require `repository: {owner, repo}`. See the
44+
[v2 migration guide](mcp-v2-migration.md) for request examples; flat owner and
45+
repo arguments are rejected.
4346

4447
`corpus.search_code` accepts up to 20 queries over one repository or snapshot
4548
scope. Every query uses the same offline corpus revision. It never falls back
@@ -97,6 +100,8 @@ Exact PR refresh uses `github.sync_pull_request_feedback`. CI uses
97100
`github.sync_pull_request_ci`; checks and statuses are bound to the observed
98101
head SHA. Offline authored-PR reads use `corpus.search_pull_requests`, and
99102
overlap analysis uses `corpus.find_pull_request_overlaps`.
103+
Use `repository: {owner, repo}` with authored portfolio synchronization or
104+
offline portfolio reads when the portfolio must be constrained to one project.
100105

101106
## Jobs, partial results, and recovery
102107

docs/mcp-v2-migration.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# MCP v2 migration: repository-bound live acquisition
2+
3+
Version 2 removes the flat `owner` and `repo` fields from the two live
4+
repository-acquisition tools. Both now require one nested `repository` object.
5+
There are no compatibility aliases or mixed forms: callers must update every
6+
request, recovery replay, and saved tool call before connecting to a v2 server.
7+
8+
## `github.search_threads`
9+
10+
Before (v1):
11+
12+
```json
13+
{
14+
"owner": "acme",
15+
"repo": "rocket",
16+
"query": "cache eviction",
17+
"kind": "issue"
18+
}
19+
```
20+
21+
After (v2):
22+
23+
```json
24+
{
25+
"repository": {"owner": "acme", "repo": "rocket"},
26+
"query": "cache eviction",
27+
"kind": "issue"
28+
}
29+
```
30+
31+
## `github.read_source_files`
32+
33+
Before (v1):
34+
35+
```json
36+
{
37+
"owner": "acme",
38+
"repo": "rocket",
39+
"ref": "main",
40+
"files": [{"path": "README.md"}]
41+
}
42+
```
43+
44+
After (v2):
45+
46+
```json
47+
{
48+
"repository": {"owner": "acme", "repo": "rocket"},
49+
"ref": "main",
50+
"files": [{"path": "README.md"}]
51+
}
52+
```
53+
54+
The tools still return an opaque artifact URI. Follow that URI only through MCP
55+
`resources/read`; the resource reader remains local and offline.
56+
57+
## Scoped authored portfolios
58+
59+
`github.sync_pull_request_portfolio` accepts the same optional `repository`
60+
scope only with `selection: "authored"`. The returned job follow-up and a
61+
truncated `corpus.search_pull_requests` recovery retain that scope. Explicit
62+
pull-request selections are already exact and reject `repository`.
63+
64+
```json
65+
{
66+
"selection": "authored",
67+
"repository": {"owner": "acme", "repo": "rocket"},
68+
"state": "open",
69+
"limit": 20
70+
}
71+
```

docs/onboarding.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ One tag version controls the Go binaries and npm package. Release automation:
230230
4. verifies the package has no install lifecycle;
231231
5. installs the tarball with `--ignore-scripts` and runs a smoke test;
232232
6. enforces a 100 MB compressed-package ceiling;
233-
7. publishes the npm package with provenance;
233+
7. publishes the npm package with provenance and waits for its exact version,
234+
`latest` tag, and fresh npx metadata invocation to agree;
234235
8. publishes matching `server.json` metadata to the MCP Registry with GitHub
235236
OIDC;
236237
9. creates a matching GitHub release.

0 commit comments

Comments
 (0)