@volter/twin-github 0.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -36
- package/client/github-mirror.css +277 -319
- package/client/github-mirror.d.ts +418 -0
- package/client/github-mirror.js +485 -0
- package/client/github-mirror.tsx +153 -357
- package/client/pulls-rest.ts +159 -0
- package/client/pulls-workspace.tsx +841 -0
- package/dist/client/github-mirror.bundle.js +239 -0
- package/dist/client/github-mirror.css +916 -0
- package/dist/client/github-mirror.d.ts +418 -0
- package/dist/client/github-mirror.js +485 -0
- package/dist/client/github-mirror.tsx +1315 -0
- package/dist/client/pulls-rest.d.ts +42 -0
- package/dist/client/pulls-rest.js +140 -0
- package/dist/client/pulls-rest.ts +159 -0
- package/dist/client/pulls-workspace.bundle.js +22 -0
- package/dist/client/pulls-workspace.d.ts +114 -0
- package/dist/client/pulls-workspace.js +418 -0
- package/dist/client/pulls-workspace.tsx +841 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +40 -0
- package/dist/src/generated/graphql-sdl.gen.json +1 -0
- package/dist/src/generated/graphql.gen.json +1 -0
- package/dist/src/generated/surface.gen.json +1 -0
- package/dist/src/generated/ui.gen.json +1 -0
- package/dist/src/github-budget.d.ts +69 -0
- package/dist/src/github-budget.js +172 -0
- package/dist/src/github-capabilities.d.ts +5 -0
- package/dist/src/github-capabilities.js +4468 -0
- package/dist/src/github-conformance.d.ts +43 -0
- package/dist/src/github-conformance.js +76 -0
- package/dist/src/github-connector.d.ts +307 -0
- package/dist/src/github-connector.js +1398 -0
- package/dist/src/github-events.d.ts +41 -0
- package/dist/src/github-events.js +230 -0
- package/dist/src/github-git-http.d.ts +49 -0
- package/dist/src/github-git-http.js +185 -0
- package/dist/src/github-git-plane.d.ts +114 -0
- package/dist/src/github-git-plane.js +407 -0
- package/dist/src/github-mirror-state.d.ts +2 -0
- package/dist/src/github-mirror-state.js +335 -0
- package/dist/src/github-mirror-ui.d.ts +20 -0
- package/dist/src/github-mirror-ui.js +101 -0
- package/dist/src/github-server.d.ts +14 -0
- package/dist/src/github-server.js +240 -0
- package/dist/src/github-shared.d.ts +12 -0
- package/dist/src/github-shared.js +21 -0
- package/dist/src/github-twin.d.ts +1411 -0
- package/dist/src/github-twin.js +4084 -0
- package/dist/src/github-ui-conformance.d.ts +4 -0
- package/dist/src/github-ui-conformance.js +105 -0
- package/dist/src/github-ui-structure.d.ts +18 -0
- package/dist/src/github-ui-structure.js +251 -0
- package/dist/src/graphql-wire.d.ts +22 -0
- package/dist/src/graphql-wire.js +89 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.js +101 -0
- package/dist/src/manifest.d.ts +8 -0
- package/dist/src/manifest.js +597 -0
- package/dist/src/npm-registry.d.ts +7 -0
- package/dist/src/npm-registry.js +47 -0
- package/dist/src/screens/app-installation.d.ts +3 -0
- package/dist/src/screens/app-installation.js +166 -0
- package/dist/src/screens/app-manifest.d.ts +3 -0
- package/dist/src/screens/app-manifest.js +81 -0
- package/dist/src/screens/oauth.d.ts +15 -0
- package/dist/src/screens/oauth.js +257 -0
- package/dist/src/screens/session.d.ts +8 -0
- package/dist/src/screens/session.js +159 -0
- package/dist/src/semantics/actions.d.ts +2 -0
- package/dist/src/semantics/actions.js +413 -0
- package/dist/src/semantics/activity.d.ts +4 -0
- package/dist/src/semantics/activity.js +161 -0
- package/dist/src/semantics/apps.d.ts +2 -0
- package/dist/src/semantics/apps.js +144 -0
- package/dist/src/semantics/branches.d.ts +2 -0
- package/dist/src/semantics/branches.js +136 -0
- package/dist/src/semantics/checks.d.ts +2 -0
- package/dist/src/semantics/checks.js +176 -0
- package/dist/src/semantics/code-scanning-upload.d.ts +2 -0
- package/dist/src/semantics/code-scanning-upload.js +97 -0
- package/dist/src/semantics/codespaces.d.ts +2 -0
- package/dist/src/semantics/codespaces.js +58 -0
- package/dist/src/semantics/commits.d.ts +2 -0
- package/dist/src/semantics/commits.js +109 -0
- package/dist/src/semantics/contents.d.ts +2 -0
- package/dist/src/semantics/contents.js +131 -0
- package/dist/src/semantics/deployments.d.ts +2 -0
- package/dist/src/semantics/deployments.js +127 -0
- package/dist/src/semantics/gists.d.ts +2 -0
- package/dist/src/semantics/gists.js +86 -0
- package/dist/src/semantics/git.d.ts +2 -0
- package/dist/src/semantics/git.js +235 -0
- package/dist/src/semantics/graphql.d.ts +7 -0
- package/dist/src/semantics/graphql.js +512 -0
- package/dist/src/semantics/index.d.ts +5 -0
- package/dist/src/semantics/index.js +62 -0
- package/dist/src/semantics/issues.d.ts +2 -0
- package/dist/src/semantics/issues.js +456 -0
- package/dist/src/semantics/keys.d.ts +2 -0
- package/dist/src/semantics/keys.js +66 -0
- package/dist/src/semantics/labels.d.ts +2 -0
- package/dist/src/semantics/labels.js +100 -0
- package/dist/src/semantics/meta.d.ts +12 -0
- package/dist/src/semantics/meta.js +144 -0
- package/dist/src/semantics/notifications.d.ts +4 -0
- package/dist/src/semantics/notifications.js +62 -0
- package/dist/src/semantics/orgs.d.ts +2 -0
- package/dist/src/semantics/orgs.js +420 -0
- package/dist/src/semantics/packages.d.ts +2 -0
- package/dist/src/semantics/packages.js +55 -0
- package/dist/src/semantics/pages.d.ts +2 -0
- package/dist/src/semantics/pages.js +176 -0
- package/dist/src/semantics/projects.d.ts +2 -0
- package/dist/src/semantics/projects.js +239 -0
- package/dist/src/semantics/pulls.d.ts +2 -0
- package/dist/src/semantics/pulls.js +462 -0
- package/dist/src/semantics/push-reactions.d.ts +101 -0
- package/dist/src/semantics/push-reactions.js +513 -0
- package/dist/src/semantics/releases.d.ts +19 -0
- package/dist/src/semantics/releases.js +231 -0
- package/dist/src/semantics/repo-invitations.d.ts +2 -0
- package/dist/src/semantics/repo-invitations.js +98 -0
- package/dist/src/semantics/repos.d.ts +17 -0
- package/dist/src/semantics/repos.js +390 -0
- package/dist/src/semantics/rulesets.d.ts +2 -0
- package/dist/src/semantics/rulesets.js +111 -0
- package/dist/src/semantics/search.d.ts +2 -0
- package/dist/src/semantics/search.js +84 -0
- package/dist/src/semantics/security.d.ts +2 -0
- package/dist/src/semantics/security.js +177 -0
- package/dist/src/semantics/shared.d.ts +61 -0
- package/dist/src/semantics/shared.js +151 -0
- package/dist/src/semantics/users.d.ts +2 -0
- package/dist/src/semantics/users.js +255 -0
- package/dist/src/semantics/webhooks.d.ts +2 -0
- package/dist/src/semantics/webhooks.js +107 -0
- package/dist/test-fixtures/github-a11y-reference.pr-list.SOURCE.md +56 -0
- package/dist/test-fixtures/github-a11y-reference.pr-list.json +1447 -0
- package/dist/test-fixtures/github-comment-schema.SOURCE.md +11 -0
- package/dist/test-fixtures/github-comment-schema.json +702 -0
- package/dist/test-fixtures/github-known-deviations.json +94 -0
- package/dist/test-fixtures/github-openapi-operations.SOURCE.md +76 -0
- package/dist/test-fixtures/github-openapi-operations.json +362 -0
- package/dist/test-fixtures/github-pull-schema.SOURCE.md +37 -0
- package/dist/test-fixtures/github-pull-schema.json +3601 -0
- package/dist/test-fixtures/github-review-schema.SOURCE.md +12 -0
- package/dist/test-fixtures/github-review-schema.json +236 -0
- package/package.json +20 -11
- package/src/cli.ts +7 -6
- package/src/generated/graphql-sdl.gen.json +1 -0
- package/src/generated/graphql.gen.json +1 -0
- package/src/generated/surface.gen.json +1 -0
- package/src/generated/ui.gen.json +1 -0
- package/src/github-a11y-snapshot.uitest.ts +5 -5
- package/src/github-budget.ts +4 -4
- package/src/github-capabilities.ts +1993 -556
- package/src/github-conformance.ts +12 -7
- package/src/github-connector.ts +108 -96
- package/src/github-events.ts +223 -95
- package/src/github-git-http.ts +47 -83
- package/src/github-git-plane.ts +247 -385
- package/src/github-journey.uitest.ts +28 -44
- package/src/github-mirror-state.ts +23 -61
- package/src/github-mirror-ui.ts +16 -10
- package/src/github-server.ts +158 -60
- package/src/github-shared.ts +1 -1
- package/src/github-twin.ts +1525 -4494
- package/src/github-ui-conformance.ts +7 -8
- package/src/github-ui-structure.ts +19 -18
- package/src/graphql-wire.ts +115 -0
- package/src/index.ts +47 -7
- package/src/manifest.ts +605 -0
- package/src/npm-registry.ts +43 -0
- package/src/screens/app-installation.tsx +217 -0
- package/src/screens/app-manifest.tsx +97 -0
- package/src/screens/oauth.tsx +258 -0
- package/src/screens/session.tsx +186 -0
- package/src/semantics/actions.ts +395 -0
- package/src/semantics/activity.ts +171 -0
- package/src/semantics/apps.ts +133 -0
- package/src/semantics/branches.ts +133 -0
- package/src/semantics/checks.ts +163 -0
- package/src/semantics/code-scanning-upload.ts +92 -0
- package/src/semantics/codespaces.ts +58 -0
- package/src/semantics/commits.ts +109 -0
- package/src/semantics/contents.ts +112 -0
- package/src/semantics/deployments.ts +116 -0
- package/src/semantics/gists.ts +85 -0
- package/src/semantics/git.ts +226 -0
- package/src/semantics/graphql.ts +505 -0
- package/src/semantics/index.ts +68 -0
- package/src/semantics/issues.ts +434 -0
- package/src/semantics/keys.ts +66 -0
- package/src/semantics/labels.ts +91 -0
- package/src/semantics/meta.ts +139 -0
- package/src/semantics/notifications.ts +58 -0
- package/src/semantics/orgs.ts +383 -0
- package/src/semantics/packages.ts +59 -0
- package/src/semantics/pages.ts +154 -0
- package/src/semantics/projects.ts +246 -0
- package/src/semantics/pulls.ts +421 -0
- package/src/semantics/push-reactions.ts +471 -0
- package/src/semantics/releases.ts +213 -0
- package/src/semantics/repo-invitations.ts +112 -0
- package/src/semantics/repos.ts +373 -0
- package/src/semantics/rulesets.ts +107 -0
- package/src/semantics/search.ts +83 -0
- package/src/semantics/security.ts +153 -0
- package/src/semantics/shared.ts +181 -0
- package/src/semantics/users.ts +252 -0
- package/src/semantics/webhooks.ts +101 -0
- package/test-fixtures/github-known-deviations.json +7 -8
- package/test-fixtures/github-openapi-operations.json +46 -227
- package/src/github-graphql.ts +0 -398
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# @volter/twin-github
|
|
2
2
|
|
|
3
|
-
The **GitHub twin** — a local replica of the GitHub **REST**
|
|
4
|
-
|
|
3
|
+
The **GitHub twin** — a local replica of the GitHub **REST** API (repositories, git data, issues, pull
|
|
4
|
+
requests, Actions, releases, organizations and teams, Apps, Pages, security alerts and more) on
|
|
5
|
+
the shared [`@volter/world-core`](../../world-core) kernel. The real `@octokit/rest` client
|
|
5
6
|
works against it unmodified.
|
|
6
7
|
|
|
7
8
|
> **Note:** both planes carry content. Local simulator/fork **writes** carry full content
|
|
8
9
|
> (a created PR has a title/body/diffs), and the connector's *pull* path folds the CONTENT
|
|
9
10
|
> real GitHub returns — PR/issue title/body/state, review bodies, comment bodies, and the
|
|
10
|
-
> inline diff findings. The
|
|
11
|
+
> inline diff findings. The one GitHub surface still unbuilt by design is bulk pull of
|
|
11
12
|
> actual repository **code/file contents** (see Coverage below).
|
|
12
13
|
|
|
13
14
|
## Surface
|
|
@@ -30,7 +31,7 @@ works against it unmodified.
|
|
|
30
31
|
with a `comments` array) carries that review's id, and a comment posted on its own carries
|
|
31
32
|
the PR's **implicit review** — one deterministic id per (repo, PR). It is synthesized on
|
|
32
33
|
`GET .../pulls/:n/reviews` *from the comments that name it* and never stored as a review of
|
|
33
|
-
its own;
|
|
34
|
+
its own; the pull request's review count counts it under exactly that condition, so the count and the
|
|
34
35
|
list describe one population (real GitHub serves the wrapper on `/reviews` and counts it
|
|
35
36
|
too). The point is that the join a consumer does (`pull_request_review_id` → the reviews
|
|
36
37
|
page) is live against the twin's own data; it used to be dead, because the twin answered
|
|
@@ -41,10 +42,32 @@ works against it unmodified.
|
|
|
41
42
|
id is never a twin id: every pulled review and comment is rehashed before it is served, and
|
|
42
43
|
no review id is ever sent back out (a push addresses a vendor comment by the `external_id`
|
|
43
44
|
the pull recorded).
|
|
44
|
-
- **
|
|
45
|
-
|
|
45
|
+
- **Repository webhooks** (`github-events.ts`): register through native `/repos/{owner}/{repo}/hooks`
|
|
46
|
+
CRUD. The server resolves stored subscriptions on every write, sends HTTP callbacks and stores
|
|
47
|
+
their outcomes in the same World. Hook configuration and delivery history survive server restart;
|
|
48
|
+
there is no separate registration helper. JSON and form payloads carry `X-GitHub-Event`,
|
|
49
|
+
`X-GitHub-Delivery` and, when configured, HMAC-SHA256 over the transmitted bytes. PR, review and
|
|
50
|
+
comment events carry their source records, including deleted comment snapshots and inline
|
|
51
|
+
comment parents. Native writes name the modeled `twin` sender separately from the source author;
|
|
52
|
+
PR IDs are stable modeled numbers and local PR update times come from their write history.
|
|
53
|
+
Unknown imported authors and update times remain unknown. Review webhook states use lowercase,
|
|
54
|
+
while REST states retain uppercase. Imported comments retain their stored identity on edit/delete;
|
|
55
|
+
known vendor edit times survive the projection. Local inline comments and replies retain their
|
|
56
|
+
target commit. PR synchronization snapshots are captured with their state writes, before callback
|
|
57
|
+
delivery, so a later push cannot replace an earlier event's head. Other emitted event types retain
|
|
58
|
+
partial payload coverage.
|
|
59
|
+
Native ping, delivery list/detail and explicit redelivery routes are supported; redelivery keeps
|
|
60
|
+
the original GUID and payload with current hook settings. Failed callbacks are recorded without
|
|
61
|
+
undoing the vendor mutation. Callback attempts run before the mutation response, with a ten-second
|
|
62
|
+
timeout per hook; automatic retries and crash recovery of pending attempts are not modeled.
|
|
63
|
+
Signing secrets are masked on native reads and the mirror. Full hook PATCH removes an omitted
|
|
64
|
+
secret; config PATCH preserves it. TLS verification remains enabled (`insecure_ssl: 1` is explicitly
|
|
65
|
+
unsupported). Identical configurations with overlapping subscriptions are refused on create or
|
|
66
|
+
update. Delivery records are local execution history and cannot be deployed to GitHub.
|
|
67
|
+
See [GitHub's repository webhook API](https://docs.github.com/en/rest/repos/webhooks) and
|
|
68
|
+
[delivery guidance](https://docs.github.com/en/webhooks/using-webhooks/best-practices-for-using-webhooks).
|
|
46
69
|
- **Conformance** (`github-conformance.ts`): field-name subset vs the vendored
|
|
47
|
-
GitHub REST PR schema (PR + nested base/head/repo
|
|
70
|
+
GitHub REST PR schema (PR + nested base/head/repo).
|
|
48
71
|
- **UI mirror** (`github-mirror-ui.ts`): a GitHub-style PR browser (React) with a
|
|
49
72
|
per-repo selector ("multiple githubs"), a pure frontend (R3) — the shell + assets with
|
|
50
73
|
the twin's own fetch adapter mounted beside them. It reads the world through the twin's
|
|
@@ -56,7 +79,7 @@ works against it unmodified.
|
|
|
56
79
|
share (the store path, the PR/issue route grammar) live in `github-shared.ts`.
|
|
57
80
|
- **Connector** (`github-connector.ts`): the live-vendor lifecycle over an injected
|
|
58
81
|
octokit-like executor. `syncGithubFromReal` pulls a repo's PRs + issues and folds their
|
|
59
|
-
content;
|
|
82
|
+
content; the kernel performs local writes through `performGithubAction`. Pull is **per-row conflict
|
|
60
83
|
tolerant**: if one stored event has diverged from what a resource now folds to (a
|
|
61
84
|
`Conflicting duplicate` — e.g. a post-append line mutation raced the live writer), that
|
|
62
85
|
ONE row is skipped rather than aborting the whole repo's fold, so every other resource in
|
|
@@ -106,11 +129,11 @@ works against it unmodified.
|
|
|
106
129
|
reply route (`POST .../pulls/{n}/comments/{comment_id}/replies`), addressing the root by
|
|
107
130
|
the id the *vendor* gave it — resolved from what a pull observed, or from what an earlier
|
|
108
131
|
push in the same sweep returned. The connector NEVER forwards a twin-minted id to a real
|
|
109
|
-
account: a reply whose root has no known GitHub id is
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
132
|
+
account: a reply whose root has no known GitHub id is refused. The kernel stops the
|
|
133
|
+
deployment at the first failed action and leaves it unconfirmed; later actions wait until
|
|
134
|
+
the failure is resolved. A successful root comment adopts the vendor ID before a subsequent
|
|
135
|
+
reply resolves it.
|
|
136
|
+
|
|
114
137
|
|
|
115
138
|
## CLI
|
|
116
139
|
|
|
@@ -122,10 +145,19 @@ world-github conformance [--root DIR]
|
|
|
122
145
|
|
|
123
146
|
Point the real `@octokit/rest` `Octokit` at it via `baseUrl`.
|
|
124
147
|
|
|
148
|
+
Locally created PRs use the modeled authenticated self account, `octocat`, matching
|
|
149
|
+
`GET /user`. Pulled PRs retain the observed author; an unknown author is omitted.
|
|
150
|
+
Older local PRs recover that same modeled author only when their retained history
|
|
151
|
+
contains an explicit agent `pull_request.create`, without changing stored records.
|
|
152
|
+
This does not add credential-specific review identity: the separate review-writer
|
|
153
|
+
limitation described above still applies. PR responses include `base.repo.full_name`
|
|
154
|
+
and the synthetic node ID `PR_<owner/repo>#<number>`, shared with the twin's GraphQL
|
|
155
|
+
API. These node IDs address twin state and are not real GitHub node IDs.
|
|
156
|
+
|
|
125
157
|
## Interaction surfaces
|
|
126
158
|
|
|
127
|
-
1. **SDK/API** — *zero edits (preferred):* `GITHUB_TWIN_URL=http://127.0.0.1:PORT node --require @volter/
|
|
128
|
-
2. **API + CLI** — `world
|
|
159
|
+
1. **SDK/API** — *zero edits (preferred):* `GITHUB_TWIN_URL=http://127.0.0.1:PORT node --require @volter/world-core/inject your-app` redirects the real `@octokit/rest` from `api.github.com` to the twin. *Or* override directly: `new Octokit({ baseUrl: 'http://127.0.0.1:PORT', auth: 'twin' })`.
|
|
160
|
+
2. **API + CLI** — run the twin in a World and inspect it with `volter world log` and `diff`. Use the [deployment guide](../../../docs/guides/deploy-from-a-shared-world.md) for changeset review and deployment.
|
|
129
161
|
3. **Read-only** — `world-github serve --read-only`: unlimited local reads, no rate limits; writes refuse like GitHub (4xx).
|
|
130
162
|
4. **UI mirror** — `world-github mirror` renders a GitHub-style view of the twin's state.
|
|
131
163
|
|
|
@@ -134,7 +166,7 @@ Point the real `@octokit/rest` `Octokit` at it via `baseUrl`.
|
|
|
134
166
|
## Coverage
|
|
135
167
|
|
|
136
168
|
Goal: **honest, explicitly tracked coverage of GitHub's core feature surface.** The only
|
|
137
|
-
|
|
169
|
+
there are no exclusions. Tracked in three buckets — anything not
|
|
138
170
|
done or carved out is a gap to close.
|
|
139
171
|
|
|
140
172
|
**Done** — PRs (create/edit/merge/list/get; **full PR/issue content on pull** — title/body/state
|
|
@@ -149,7 +181,7 @@ list/get workflows, workflow_dispatch → queued run, rerun/cancel transitions,
|
|
|
149
181
|
status/branch/event, run jobs; **rendered in the UI mirror** Actions view), **Actions
|
|
150
182
|
secrets/variables** (repo + org scope — secret values never returned, mirroring GitHub),
|
|
151
183
|
**Actions caches** (list/delete by id or key), **Actions artifacts** (register/list/get/delete
|
|
152
|
-
metadata), **Actions run logs** (302 redirect to a signed URL; bytes
|
|
184
|
+
metadata), **Actions run logs** (302 redirect to a signed URL; serving the bytes is a todo), **Git Data
|
|
153
185
|
API** (refs create/get/update/delete, commits, trees, blobs *with content*, annotated tags),
|
|
154
186
|
**deployments + deployment statuses** (create/list/filter + status history), **environments**
|
|
155
187
|
(create/update/delete + protection-rule summaries; **rendered in the UI mirror** Deployments
|
|
@@ -158,20 +190,31 @@ pagination, webhooks, UI mirror (rung-5 ✅), connector (pull content+issues + p
|
|
|
158
190
|
merge/review/comment/status/check/milestone/reviewers), **Gists** (create/edit/list/get/delete +
|
|
159
191
|
comments).
|
|
160
192
|
|
|
161
|
-
|
|
162
|
-
`
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
193
|
+
Draft PRs become ready through GitHub's GraphQL
|
|
194
|
+
[`markPullRequestReadyForReview`](https://docs.github.com/en/graphql/reference/pulls#markpullrequestreadyforreview)
|
|
195
|
+
mutation and return to draft through
|
|
196
|
+
[`convertPullRequestToDraft`](https://docs.github.com/en/graphql/reference/pulls#convertpullrequesttodraft).
|
|
197
|
+
Both preserve the PR number, head and reviews and emit `pull_request` with action
|
|
198
|
+
`ready_for_review` or `converted_to_draft`. Invalid selections, unknown nodes, closed PRs
|
|
199
|
+
and requests for the current draft state fail without changing stored state.
|
|
200
|
+
The payload subset is `clientMutationId` and
|
|
201
|
+
`pullRequest { id number isDraft url }`.
|
|
202
|
+
REST PR updates ignore the unsupported `draft` field; creation still accepts it.
|
|
203
|
+
Deploying a draft-state change resolves the destination PR's own node ID and uses
|
|
204
|
+
the matching GraphQL mutation, confirming the returned state before acknowledging it.
|
|
205
|
+
|
|
206
|
+
**Git smart HTTP.** Unmodified Git clients clone and push through the portable JavaScript
|
|
207
|
+
Git implementation in `@volter/world-core/git`. Git Data REST and smart HTTP share the
|
|
208
|
+
object store and refs. Real Git is the test oracle; serving does not spawn Git subprocesses.
|
|
209
|
+
Pushes update REST refs and open PR heads and emit push webhooks. Only refs backed by stored
|
|
210
|
+
objects are advertised.
|
|
211
|
+
|
|
212
|
+
PR merges check required statuses and check runs before updating the base ref. Three-way
|
|
213
|
+
merges preserve non-overlapping file and text changes, reject conflicting changes, and
|
|
214
|
+
compare the base tip again while holding the ref lock. Armed auto-merge runs on a protected branch when its declared required
|
|
215
|
+
checks turn green. A newer failure supersedes an old success, and drafts stay open. Merge commits preserve two parents; squash and the modeled rebase method
|
|
216
|
+
fold the result into one commit. Rename detection, binary conflict resolution, and general
|
|
217
|
+
Git rebase semantics are not modeled.
|
|
175
218
|
|
|
176
219
|
**SDLC control plane for merge gates** — commit statuses at a sha, check runs, branch
|
|
177
220
|
protection that **persists** `required_status_checks` (contexts/strict) + `enforce_admins` and
|
|
@@ -189,13 +232,13 @@ hermetically against this twin.
|
|
|
189
232
|
**orgs/teams/members** (membership), the rest of the
|
|
190
233
|
**GraphQL API** (the modeled subset now includes the gh pr view merge-gate fields), security
|
|
191
234
|
(code-scanning/dependabot/secret-scanning), packages/pages/codespaces, git-plane follow-ons
|
|
192
|
-
(protection
|
|
235
|
+
(full protection enforcement on receive-pack and the remaining PR policies, shallow/partial clone asserts, LFS, SSH
|
|
193
236
|
transport). (Actions **log bytes** stay out — CI-compute output, see Out of scope.)
|
|
194
237
|
|
|
195
238
|
**Out of scope** (deliberately not modeled, with reason) —
|
|
196
239
|
- ~~Actual repository code / file contents~~ **narrowed 2026-08-20**: the git plane now stores
|
|
197
240
|
REAL blob/tree/commit bytes for repos exercised through Git Data REST or `git push`. What
|
|
198
|
-
remains
|
|
241
|
+
remains unbuilt is bulk *pull* of a real remote repository's full object graph through
|
|
199
242
|
the connector (large + redundant for an evidence twin); the API objects AND locally-authored
|
|
200
243
|
bytes are covered.
|
|
201
244
|
- Running real **CI compute** (executing Actions workflows): infra, not the API — the run/job
|
|
@@ -214,9 +257,18 @@ validated by *method identity*, so a subclass or a `Proxy` that replaces `checkB
|
|
|
214
257
|
|
|
215
258
|
The declared numbers: **600 points / hour**, using GitHub's *own* published point scheme: a `GET`/`HEAD`/`OPTIONS` is 1 point. Bounded on every published axis at once — ≤12% of the 5,000 requests/hour primary limit; under the 900-points-per-**minute** secondary limit even if the whole hour were spent instantly. Writes are charged **8** rather than GitHub's own 5, the single departure from its table and a *tightening*: at 5 the hour-long window would admit 120 writes inside one minute, 1.5× the documented 80 content-generating requests/minute.
|
|
216
259
|
|
|
217
|
-
The mechanism is **shared and vendor-agnostic** — it lives in the kernel (`@volter/
|
|
218
|
-
`
|
|
260
|
+
The mechanism is **shared and vendor-agnostic** — it lives in the kernel (`@volter/world-core` →
|
|
261
|
+
`packages/world-core/src/rateBudget.ts`); what lives here in [`src/github-budget.ts`](src/github-budget.ts) is this vendor's
|
|
219
262
|
**declaration** (window, ceiling, per-endpoint weights, and a `reason` citing the limits above) plus
|
|
220
263
|
the vendor-bound `GithubBudget`. The rule is ratified as
|
|
221
|
-
[
|
|
264
|
+
[../../../docs/contributing/architecture.md](../../../docs/contributing/architecture.md) **D8**, and the kernel module's header documents what the
|
|
222
265
|
guard does *not* guarantee — read that before trusting it.
|
|
266
|
+
|
|
267
|
+
Contents API writes in Git-backed repositories create real blobs, trees and commits on the selected branch. Reads of contents and README files honor branch, tag and commit references; clone/fetch sees the same bytes. Updates and deletions require the current blob SHA, and a competing branch update refuses with 409. Repositories represented only by connector observations retain their observed-file behavior.
|
|
268
|
+
|
|
269
|
+
Discussion seeding uses GitHub GraphQL `repository.discussionCategories` and `createDiscussion`;
|
|
270
|
+
readback and `addDiscussionComment` share the same stored discussion. Category lookup supports
|
|
271
|
+
forward `first`/`after` pagination. The remaining GraphQL surface is partial; unsupported fields fail loudly.
|
|
272
|
+
See [GitHub’s schema](https://docs.github.com/en/graphql/reference/discussions).
|
|
273
|
+
Category fields are limited to ID, name, slug, description and answerability; emoji is not modeled.
|
|
274
|
+
Creation emits the existing discussion webhook through the normal server delivery path.
|