Skip to content

revert(docs): unmerge #243, #227 and #231 - #246

Merged
lg2m merged 3 commits into
mainfrom
revert/unmerge-243-227-231
Oct 5, 2026
Merged

lg2m merged 3 commits into
mainfrom
revert/unmerge-243-227-231

Conversation

@lg2m

@lg2m lg2m commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Reverts three PRs that were merged without approval:

Each merge is reverted with git revert -m 1 (newest first), so history is kept.

Verification

The resulting tree matches exactly what you get by cherry-picking the later PRs (#238, #240, #242, #244) onto the pre-merge base 2a672fe (git diff is empty). No other work is affected.

The three PRs get reopened as new PRs carrying their original commits.

lg2m added 3 commits October 4, 2026 20:05
…nts-plan"

This reverts commit c151be2, reversing
changes made to 8631882.
…rchitecture"

This reverts commit 8631882, reversing
changes made to 2a672fe.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T03:12:13.923309Z 15324ca PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/retsu-AI/qq/blob/15324ca2d6796df3cd32b3611def51e02eb4dce6/docs/plans/progress/decisions-needed.md#L21
P2 Badge Preserve the unresolved fleet-push decision

Removing decision 12 discards an unresolved architecture question even though this ledger is append-only and only the lead may resolve entries. If the fleet PR is reopened, its remote-push work now loses the recorded conservative default that holds U8 and remote push routes, so later work can proceed without resolving the shared VAPID/trust-model conflict. Retain the row as open, or let the lead record an explicit resolution instead of deleting it.

AGENTS.md reference: AGENTS.md:L14-L19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

will be appended after gates and independent review.

Next free number: 0056. Reserve here before opening a PR that adds an ADR.
Next free number: 0055. Reserve here before opening a PR that adds an ADR.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep ADR-0055 reserved while reopening its PR

Because this commit says PR #231 will be reopened with its original commits, changing the next free number back to 0055 allows another slice to reserve that number before the reopened ADR-0055 lands, causing duplicate ADR identifiers or forcing an already recorded decision to be renumbered. Keep 0055 reserved or tombstoned and leave the next free number at 0056.

AGENTS.md reference: AGENTS.md:L14-L19

Useful? React with 👍 / 👎.

Comment on lines +43 to +49
- **Pairing code**: `qq pair [--name <hint>] [--ttl 5m]` (running against the
local server) asks the server to mint a code: 8 characters from a 32-symbol
alphabet (no `0/O/1/I`), ~40 bits, single-use, expires after 5 minutes,
invalidated after 3 wrong attempts. The server holds pending codes in
memory only (bounded: 8 outstanding; minting a ninth fails). The CLI prints
the code and a
`qq://pair?base_url=<base_url>&server_id=<server_id>&code=<code>` URL / QR
for the shells' deep-link handler. `base_url` is selected from the validated
one-shot override or S6's `server.advertised_url`, in that order. It uses the
same grammar as `ServerConnection`; the CLI never derives it from
`listener.local_addr()`. If neither source exists, QR/deep-link minting
fails and tells the operator to set `server.advertised_url` (the persistent
path for loopback + `tailscale serve`) or pass the override. Until S6 lands,
the override is required. Before minting, the server-side
prompt confirms the selected URL and the exact independent scopes granted:
`read`, `run`, `approve`, `session_admin`, and `client_admin`. No scope is
implied by another except where a route explicitly also requires `read` to
return state.
the code and a `qq://pair?host=<base_url>&code=<code>` URL / QR for the
shells' deep-link handler.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Provide a client-reachable URL for pairing links

When the preferred remote setup places tailscale serve in front of a loopback qq serve, the local server only knows its loopback listener while the phone/browser needs the external HTTPS proxy URL. This restored contract prints base_url without defining any flag or configuration source for it, so the pairing link is either impossible to construct or points at an address the client cannot reach. Restore a validated advertised-URL setting or one-shot override before requiring the CLI to emit this link.

Useful? React with 👍 / 👎.

Comment on lines 68 to 70
- **Management**: `GET /v1/clients` and `POST /v1/clients/revoke { client_id }`
require the loopback token or `client_admin`. CLI: `qq clients
(authenticated; loopback token or any enrolled client). CLI: `qq clients
list`, `qq clients revoke <id|name>`. Revocation is immediate: the cache

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict client management to an administrative credential

When S2 implements this ADR, any enrolled credential—including a kiosk credential or one copied from a lost device—will be authorized to enumerate and revoke every other client. The loopback token remaining valid prevents total lockout but does not prevent remote denial of service or disclosure of the client list. Require the loopback token or a dedicated immutable admin scope for these management routes.

Useful? React with 👍 / 👎.

Comment on lines +74 to 76
- **`qq_protocol`**: new `EnrollRequest`, `EnrollResponse`, `ClientSummary`,
`RevokeClientRequest`, wire fixtures, `PROTOCOL_VERSION` 18. `ServerInfo`
gains `enrollment: bool` so a UI knows whether the server accepts pairing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bump from the current protocol version

At this commit crates/qq-protocol/src/lib.rs:70 already defines PROTOCOL_VERSION as 30, so specifying version 18 for the future enrollment wire changes is stale and cannot be implemented without downgrading capability negotiation. That would make current clients and fixtures interpret a newer wire contract as an older one. State that S2 bumps the then-current version rather than pinning the obsolete value 18.

Useful? React with 👍 / 👎.

Comment on lines 50 to 52
- **Enrollment**: `POST /v1/enroll { pairing_code, client_name }` is the only
unauthenticated data route; CORS preflight carries no application data.
`/v1/health` remains authenticated by the loopback token or an enrolled
credential with `read`. Success returns `{ client_id,
unauthenticated route besides `/v1/health`. Success returns `{ client_id,
credential, server_info }` exactly once; the code is consumed. Rate limit:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep health metadata behind authentication

When S2 exposes the server remotely, this exception makes /v1/health publicly disclose the process ID, durable store ID, configured or host-derived display name, and exact QQ/protocol versions. The current server deliberately applies authentication to this route and pins that behavior in crates/qq-server/src/lib.rs:1894, so implementing the restored ADR would regress an existing metadata boundary. Keep health authenticated and leave only enrollment data unauthenticated.

Useful? React with 👍 / 👎.

@lg2m
lg2m merged commit bfbe814 into main Oct 5, 2026
6 checks passed
@lg2m
lg2m deleted the revert/unmerge-243-227-231 branch October 5, 2026 03:15
lg2m added a commit that referenced this pull request Oct 5, 2026
…act record (CX0+CX1) (#239)

* docs(plans): plan fast, exact, cache-aligned compaction; ADR-0055 (CX0)

Plan docs/plans/compaction.md (CX0-CX5), ledger with the live-store
baseline (110-390 s per compaction, cold cache), and Proposed ADR-0055:
the summarizer writes a short narrative and QQ renders the exact record
from stored rows. Reserves ADR-0055 in progress/root.md (0054 is taken by

Refs: ENG-992, ENG-993

* perf(runtime): compaction writes a short narrative; QQ renders the exact record (CX1)

The summarizer now writes five short sections (Intent; Decisions and
constraints; Work state; Open problems; Next step) instead of retyping
user messages, errors and file lists. At commit, in the same transaction,
QQ renders a bounded record from stored rows and stores it after the
narrative: every user message and applied steering verbatim (older
prompts listed by ordinal for search_history), the last reply, files
modified and read, and failed calls. The record is rebuilt from rows at
every compaction, so it stays exact across any number of folds.

- Between runs, shrinkage is required of the narrative; the record is a
  bounded cost, so a stored six-section summary always folds into the
  new format. In-run steps count the record too.
- The summarizer uses the run's resolved output cap, held to an eighth of
  a declared window (never below 8 192), instead of a fixed 8 192 clamp.
- The in-run commit returns the stored text, so the live splice and
  replay render the same bytes.
- No schema or protocol change.

Refs: ENG-992, ENG-994

* docs(plans): link CX0/CX1 ledger rows to #239

* docs(plans): keep ADR-0056 after the #246 revert; hold 0055 for #249

* docs(runtime): cite ADR-0056 in compaction code comments and tools.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant