Skip to content

Commit fa32e96

Browse files
authored
docs: finalize cold-start contract (#13)
Clarify current-request remote authorization, deterministic cold-start branch handling, completed pre-visibility history, and the visibility authorization gate.
1 parent a654521 commit fa32e96

3 files changed

Lines changed: 137 additions & 102 deletions

File tree

AGENTS.md

Lines changed: 52 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,60 @@
33
This file is the self-contained engineering contract for the public CometAPI
44
Python SDK repository. Treat this directory as the repository root.
55

6-
## Repository authority
6+
## Repository authority and remote permissions
77

8-
Repository-local source, tests, documentation, metadata, fixtures, and workflow
9-
definitions may be changed and verified locally. The current milestone may use
10-
private pull requests and credential-free GitHub Actions to complete the
11-
remaining pre-visibility work. Changing repository visibility, configuring
12-
secrets or environments, making live API requests, creating tags or releases,
13-
publishing to PyPI, and changing registry settings remain outside the current
14-
authorized pre-visibility scope.
8+
Repository documents define permitted workflows and safety boundaries; they do
9+
not grant standing permission to change local tracked content or remote state.
10+
Any push, pull-request creation or update, merge, comment, or other remote
11+
mutation requires explicit authorization in the current maintainer request.
12+
Without new explicit authorization, limit work to local read-only inspection or
13+
validation and do not create another pre-visibility closeout pull request.
14+
15+
Repository visibility, settings, branch or tag rules, Private Vulnerability
16+
Reporting, secrets, variables, environments, live API requests, tags, releases,
17+
PyPI operations, and other registry operations each require separate explicit
18+
authorization. Authorization for one action does not authorize another.
1519

1620
A local build, mocked test, statically valid workflow, or private remote CI run
1721
proves only its own evidence layer. Never invent or mock missing evidence.
1822

1923
## Git branch lifecycle
2024

21-
- Use a dedicated short-lived topic branch for each task. `dev` is the clean
22-
local landing branch between tasks; do not commit task changes directly to
23-
`dev`.
25+
- Start every authorized task from a clean worktree. Fetch `origin`, switch to
26+
local `main`, require `main` to be an ancestor of `origin/main`, and run
27+
`git merge --ff-only origin/main`. Require the worktree to remain clean and
28+
`main` to equal `origin/main` after the fast-forward.
29+
- If local `dev` does not exist, create it with `git switch -c dev` only while
30+
the synchronized, clean `main` is checked out. If local `dev` exists, require
31+
`dev` to be an ancestor of `main`, switch to `dev`, and run
32+
`git merge --ff-only main`. Require `dev` to equal `main` after either path.
33+
- Only after those startup checks pass may an authorized task create its
34+
dedicated short-lived topic branch from synchronized `dev`. Do not commit
35+
task changes directly to `dev`.
2436
- Treat a topic branch lifecycle as closed only after its required pull-request
2537
checks pass and its squash merge is present on `origin/main`. Any alternate
2638
disposition requires explicit user authorization and must not advance `dev`
2739
until the accepted commit is present on `origin/main`.
28-
- With a clean worktree, fetch `origin`, switch to `main`, and fast-forward it
29-
with `git merge --ff-only origin/main`. Require the worktree to remain clean
30-
and `main` to equal `origin/main` before handling `dev`. If local `dev`
31-
exists, require it to be an ancestor of `main`, switch to it, and fast-forward
32-
it with `git merge --ff-only main`; if it does not exist, create it with
33-
`git switch -c dev` only from that checked-out, clean, synchronized `main`.
34-
Finish with `dev` checked out. Cleanup is complete only when the worktree is
35-
clean and `HEAD`, local `main`, local `dev`, and `origin/main` resolve to the
36-
same commit.
37-
- Never reset, discard work, force-update refs, delete branches, or push `dev`.
38-
If fetching fails, the worktree is dirty, `main` cannot fast-forward to
39-
`origin/main`, an existing `dev` cannot fast-forward to `main`, or the four
40-
final refs differ, stop and report the exact state instead of forcing
41-
synchronization.
40+
- After merge and required verification, start from a clean worktree, fetch
41+
`origin`, switch to `main`, require it to be an ancestor of `origin/main`, and
42+
fast-forward it with `git merge --ff-only origin/main`. Require `main` to
43+
equal `origin/main`, require `dev` to be an ancestor of `main`, switch to
44+
`dev`, and fast-forward it with `git merge --ff-only main`. Finish on a clean
45+
`dev` with `HEAD`, local `main`, local `dev`, and `origin/main` all equal.
46+
- Any dirty worktree, fetch failure, ahead or divergent local branch, failed
47+
ancestry check, failed fast-forward, or final ref mismatch must fail closed.
48+
Never reset, rebase, discard work, force-update refs, delete or recreate an
49+
existing `dev`, or push `dev` to recover. Report the exact state instead.
4250

4351
## Current milestone: Public Preview
4452

45-
Private Remote Validation is complete. Prepare the private canonical repository
46-
for a future explicitly authorized visibility change, and stop before changing
47-
visibility. A session starting in this repository must be able to finish the
48-
remaining pre-visibility work without instructions outside the repository.
53+
Public Preview pre-visibility complete; visibility change awaiting explicit authorization.
54+
55+
Private Remote Validation is complete. The sanitized first history, empty
56+
private repository creation, initial push, and pre-visibility closeout are
57+
completed historical steps and must not be repeated. The canonical repository
58+
remains private at the visibility authorization gate. Public Preview is not
59+
ready, and no pre-visibility implementation task remains.
4960

5061
The accepted identity is:
5162

@@ -61,22 +72,22 @@ The accepted identity is:
6172
| Support and conduct | `support@cometapi.com` |
6273
| Security | `https://github.com/cometapi-dev/cometapi-python/security/advisories/new` |
6374

64-
Before changing repository visibility:
75+
At the visibility authorization gate:
6576

66-
1. Resolve or explicitly defer every dependency disposition that `ROADMAP.md`
67-
still records as unresolved; its pre-visibility dependency disposition table
68-
is the durable source of truth.
77+
1. Treat the dependency dispositions recorded in `ROADMAP.md` as authoritative
78+
for the listed pull requests. Process newly opened dependency pull requests
79+
through normal maintenance only when a current maintainer request explicitly
80+
authorizes that work, without reopening completed dispositions.
6981
2. Keep `.github/CODEOWNERS` absent until a real multi-maintainer model exists.
7082
3. Keep scheduled and manually dispatched live smoke fail-closed behind
7183
`LIVE_SMOKE_ENABLED=true`, and keep `RELEASE_PLEASE_ENABLED` disabled through
7284
the initial manual alpha.
73-
4. Run every local offline, package, self-containment, public-content, secret,
74-
and workflow-static-validation gate, then deliver the pre-visibility changes
75-
through a private pull request with successful credential-free CI.
76-
5. Confirm the canonical repository is still private and stop. Visibility,
77-
branch or tag rules, Private Vulnerability Reporting, secrets, protected
78-
environments, Trusted Publishing, live API calls, tags, releases, and
79-
publication require separate authorization after this stop point.
85+
4. Do not create another pre-visibility closeout pull request unless a current
86+
maintainer request explicitly authorizes a new, scoped change.
87+
5. Stop before changing visibility. After an explicitly authorized visibility
88+
change, repository rules, Private Vulnerability Reporting, protected
89+
environments, default-branch CI, and authorized protected live smoke must
90+
pass before Public Preview can be marked ready.
8091

8192
## Repository independence
8293

@@ -226,7 +237,7 @@ committed.
226237
with shipped behavior. Use currently supported model IDs.
227238
- All repository documentation is written in English.
228239

229-
Before Public Preview, run
240+
Before marking Public Preview ready, run
230241
`uv run python scripts/check_version.py --require-public-preview-docs`. The
231242
gate must report every detected violation and fail until canonical identity,
232243
contacts, repository metadata, and durable public-facing content are complete.

RELEASING.md

Lines changed: 51 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ upload is evidence only for its own layer.
1818

1919
## Private Remote Validation
2020

21-
Before Public Preview, initialize an empty private repository from a sanitized
22-
first commit. Do not ask GitHub to generate a README, license, or ignore file.
23-
The complete history must already be suitable for public visibility.
21+
The canonical repository has completed Private Remote Validation. This section
22+
records its one-time initialization history; it is not an instruction to
23+
recreate the repository, rewrite the sanitized first history, or repeat the
24+
initial push. The repository was initialized empty from a sanitized first
25+
commit, without a generated README, license, or ignore file, and the complete
26+
history was required to be suitable for public visibility.
2427

25-
Apply these canonical values before the first push:
28+
The one-time initialization used these canonical values before the first push:
2629

2730
| Field | Required value |
2831
| --- | --- |
@@ -35,24 +38,28 @@ Apply these canonical values before the first push:
3538
| Support and conduct | `support@cometapi.com` |
3639
| Security | `https://github.com/cometapi-dev/cometapi-python/security/advisories/new` |
3740

38-
The package manifest uses `authors = [{ name = "CometAPI" }]`. Remove
39-
`.github/CODEOWNERS` and its validation dependencies; it is not required while
40-
the project has one active maintainer.
41-
42-
Before the first push, require `LIVE_SMOKE_ENABLED=true` for scheduled and
43-
manually dispatched live execution, and keep `RELEASE_PLEASE_ENABLED` disabled
44-
through the initial manual alpha. An unset or non-true value prevents the
45-
corresponding gated job from executing. The release live-model configuration
46-
resolves an unset or empty `COMETAPI_LIVE_MODEL` to `gpt-5.4`.
47-
48-
The private stage validates sanitized history, the complete local gate, and
49-
real credential-free default-branch CI only. Do not configure or exercise
50-
branch or tag rules, Private Vulnerability Reporting, secrets, protected
51-
environments, Trusted Publishing, live API calls, tags, releases, or registry
52-
publication. Record the CI result and stop before changing visibility.
53-
54-
Run the fail-closed content and identity gate before the first remote push and
55-
again before changing repository visibility:
41+
The package manifest uses `authors = [{ name = "CometAPI" }]`.
42+
`.github/CODEOWNERS` and its validation dependencies were absent from the
43+
completed private initialization and remain unnecessary while the project has
44+
one active maintainer.
45+
46+
Before the historical first push, scheduled and manually dispatched live
47+
execution was required to fail closed unless `LIVE_SMOKE_ENABLED=true`, and
48+
`RELEASE_PLEASE_ENABLED` was kept disabled through the initial manual alpha. An
49+
unset or non-true value prevents the corresponding gated job from executing.
50+
The release live-model configuration resolves an unset or empty
51+
`COMETAPI_LIVE_MODEL` to `gpt-5.4`.
52+
53+
The completed private stage validated sanitized history, the complete local
54+
gate, and real credential-free default-branch CI only. It did not configure or
55+
exercise branch or tag rules, Private Vulnerability Reporting, secrets,
56+
protected environments, Trusted Publishing, live API calls, tags, releases, or
57+
registry publication. Its recorded CI result is historical evidence, not a
58+
reason to repeat initialization.
59+
60+
The fail-closed content and identity gate was required before the historical
61+
first remote push. Run it again before an explicitly authorized visibility
62+
change and before marking Public Preview ready:
5663

5764
```bash
5865
uv run python scripts/check_version.py --require-public-preview-docs
@@ -92,6 +99,10 @@ verification record.
9299

93100
## Final post-merge evidence
94101

102+
This procedure grants no standing permission for remote writes. Run it only
103+
when the current maintainer request explicitly authorizes the pull-request
104+
lifecycle and its final timeline comment.
105+
95106
After a pre-visibility pull request is squash-merged, complete its evidence
96107
record against the resulting default-branch commit:
97108

@@ -183,19 +194,24 @@ Arbitrary-branch and manual publication are forbidden.
183194

184195
## Alpha release checklist
185196

186-
Maintainers execute this sequence in order:
187-
188-
1. Complete the canonical identity table, replace unresolved public status
189-
text, remove `CODEOWNERS` and its checks, and run the local content,
190-
self-containment, package, secret, and workflow gates.
191-
2. Create the empty private repository, push the sanitized first history, wait
192-
for real credential-free default-branch CI, record its result, and stop for
193-
explicit visibility-change authorization.
194-
3. After the repository becomes public, require pull requests and blocking CI
195-
for `main` with zero required approvals, block force pushes and deletion,
196-
reserve administrator bypass for emergencies, protect version tags from
197-
updates and deletion, enable immutable releases and Private Vulnerability
198-
Reporting, and rerun default-branch CI.
197+
For the current canonical repository, the private initialization and
198+
pre-visibility closeout are completed historical prerequisites. The next
199+
external action is a visibility change, and it requires separate explicit
200+
authorization. This checklist defines dependency order, not standing
201+
permission: every remote mutation, live request, release action, and registry
202+
action must be explicitly authorized in the current maintainer request; stop
203+
otherwise. Maintainers execute authorized steps in order:
204+
205+
1. Confirm the recorded canonical identity, absent `CODEOWNERS`, local gates,
206+
sanitized first history, initial private push, credential-free CI, and
207+
pre-visibility closeout. Do not recreate or repeat those historical steps.
208+
2. Obtain explicit authorization for the visibility change and stop if it is
209+
absent.
210+
3. After the authorized repository visibility change, require pull requests and
211+
blocking CI for `main` with zero required approvals, block force pushes and
212+
deletion, reserve administrator bypass for emergencies, protect version tags
213+
from updates and deletion, enable immutable releases and Private
214+
Vulnerability Reporting, and rerun default-branch CI.
199215
4. Configure `live-smoke` with no required reviewer and `pypi` with approval by
200216
the current release approver and self-review allowed. Set
201217
`LIVE_SMOKE_ENABLED=true`, provide the authorized key, and run the protected

0 commit comments

Comments
 (0)