Skip to content

docs(structure): split oversize docs and describe every source area - #5596

Merged
lidge-jun merged 11 commits into
devfrom
codex/structure-tidy
Sep 23, 2026
Merged

lidge-jun merged 11 commits into
devfrom
codex/structure-tidy

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Stacked on #5593 (base codex/remove-docs-pr-assets). Retarget to dev after #5593 lands.

structure/manifest.json carried two grace lists that structure/AGENTS.md treats as debt to pay down, not a place to park work. This PR empties both.

  • Oversize docs split. transports/responses.md (1507 lines, 2.5× the 600-line budget), gui-and-management-api.md (813) and providers/openai-tiers.md (744) are split along existing heading boundaries into new docs:

    • transports/responses-wire-shapes.md
    • transports/responses-failover.md
    • transports/responses-spend.md
    • dashboard-and-usage.md
    • providers/openai-accounts.md

    Text moves byte for byte. The only edit to moved text promotes a ### subsection to ## where it became top level, and anchors are unchanged. A multiset comparison of non-blank lines shows 0 lost lines. 172 cross-links were rewritten to the doc that now owns each anchor. Fourteen decision records whose owning doc moved now point at it; the rest are untouched. The largest structure doc is now 600 lines.

  • Every source area described. New sections name the six areas no doc covered:

    • the adapter-to-Responses bridge (src/bridge.ts, src/bridge/)
    • quota-reset notifications (src/quota/)
    • the read-only service-manager probe (src/service-manager-probe.ts)
    • shared sidecar auth and candidates (src/sidecar/)
    • shared type declarations (src/types/)

    Every sentence was checked against source.

  • One source comment (src/lib/upstream-retry.ts) pointed at a moved anchor.

Out of scope: grace.unboundInvariants (INV-HOME-01, INV-SLUG-01) needs new tests rather than doc edits. Plan and review: devlog/_plan/260923_structure_tidy/.

Verification

  • bun run structure:check: pass with grace.oversizeDocs and grace.undocumentedSourceAreas both empty. structure/INDEX.md was regenerated with bun run structure:index.
  • bun test tests/ci-workflows/structure-ssot.test.ts tests/ci-workflows/repo-hygiene.test.ts: 66 pass, 0 fail.
  • bun run typecheck, bun run privacy:scan: pass.
  • No test reads the split docs by path (rg 'structure/' tests). The source diff is one comment line, so the full suite was not run locally; hosted CI covers it.
  • Review: two read-only gpt-6-sol verifiers checked split fidelity and prose accuracy. Their four blockers (decision-record owners, manifest mapping, two overstatements) were fixed, and both re-verified PASS.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Documentation
    • Reorganized the project documentation into clearer guides for dashboard and usage, OpenAI account management, and Responses wire formats, failover, and send budgets.
    • Updated references throughout the documentation to point to the relevant guides.
    • Added guidance on companion usage timelines, shared services, and account behavior.

Delete the root docs/ folder and the other PR evidence image folders (.github/pr-assets, assets/pr-screenshots, docs-site/public/pr-screenshots, loose assets/pr*.png). Move the GUI design-system contract and its ADR 0004/0005 to gui/design-system/, port the GitHub Copilot App client setup into docs-site guides/integrations.md, point every live reference at devlog/ or git history, declare docs/ in structure absentPaths, and guard the retired paths in repo-hygiene. Screenshots now go in the PR description or on the orphan pr-assets branch.
Carry the headless CLI parity rule, the doctor proxy-env disclosure rule and the CL-10 public-evidence closure contracts into structure/, state that sourceModels replaces the default shadow-call prefixes, explain the Copilot App API key on remote binds, and describe the screenshot gate by the gui/ paths it actually checks.
Split transports/responses.md, gui-and-management-api.md and providers/openai-tiers.md along heading boundaries so every structure doc fits the 600-line budget, rewriting cross-links to the doc that now owns each anchor. Describe src/bridge*, src/quota/, src/service-manager-probe.ts, src/sidecar/ and src/types/ in their owning docs. Both grace lists are now empty.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 22, 2026 20:09
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: a42cc9d5-1e58-489c-919c-82bbbdf1d384

📥 Commits

Reviewing files that changed from the base of the PR and between e461562 and 916a30a.

📒 Files selected for processing (46)
  • structure/INDEX.md
  • structure/adapters/registry.md
  • structure/catalog.md
  • structure/clients/claude-desktop.md
  • structure/codex-home.md
  • structure/companion.md
  • structure/config.md
  • structure/dashboard-and-usage.md
  • structure/data-planes/images.md
  • structure/data-planes/inbound-compat.md
  • structure/decisions/ADR-0040-responses-http-sse.md
  • structure/decisions/ADR-0041-responses-http-sse.md
  • structure/decisions/ADR-0042-responses-http-sse.md
  • structure/decisions/ADR-0043-responses-http-sse.md
  • structure/decisions/ADR-0044-responses-http-sse.md
  • structure/decisions/ADR-0069-chat-to-responses-message-phase-inference.md
  • structure/decisions/ADR-0070-same-provider-combo-quota-fallback.md
  • structure/decisions/ADR-0071-combo-streaming-commit-boundary.md
  • structure/decisions/ADR-0078-usage-accounting.md
  • structure/decisions/ADR-0079-usage-accounting.md
  • structure/decisions/ADR-0087-model-and-wire-identity.md
  • structure/decisions/ADR-0088-model-and-wire-identity.md
  • structure/decisions/ADR-0089-process-local-affinity-diagnostics.md
  • structure/decisions/ADR-0096-z-ai-quota-destination-ownership.md
  • structure/decisions/ADR-0099-responses-http-sse.md
  • structure/design-methodology.md
  • structure/gui-and-management-api.md
  • structure/manifest.json
  • structure/ops/docs-and-release.md
  • structure/ops/service-and-sidecars.md
  • structure/overview.md
  • structure/providers-and-adapters.md
  • structure/providers/chat-compat.md
  • structure/providers/cursor.md
  • structure/providers/openai-accounts.md
  • structure/providers/openai-tiers.md
  • structure/providers/xai-grok.md
  • structure/runtime.md
  • structure/subagents.md
  • structure/transports/byte-accounting.md
  • structure/transports/inventory.md
  • structure/transports/responses-failover.md
  • structure/transports/responses-spend.md
  • structure/transports/responses-wire-shapes.md
  • structure/transports/responses.md
  • structure/transports/streaming-health.md
 ______________________________________
< I am an equal opportunity nitpicker. >
 --------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 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-09-22T20:14:51.916223Z 23ac89c 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.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@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

Here are some automated review suggestions for this pull request.

Reviewed commit: 23ac89c59d

ℹ️ 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".

Comment thread structure/dashboard-and-usage.md Resolved
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 44 / 80

이 PR은 structure/ 문서 빚을 갚는 청소예요. 예전에 manifest.json이 “지금은 너무 길어도 봐준다”고 적어 둔 문서가 세 개 있었어요. transports/responses.md(약 1507줄), gui-and-management-api.md(813줄), providers/openai-tiers.md(744줄)예요. 600줄 한도를 넘겼어요. 또 문서가 이름조차 안 부른 소스 자리가 여섯 곳 있었어요. src/bridge.ts, src/bridge/, src/quota/, src/service-manager-probe.ts, src/sidecar/, src/types/예요.

이번 변경은 그 긴 문서를 이미 있던 제목 경계에서 잘라 새 문서로 옮겨요. Responses는 wire 모양·failover·spend로, GUI는 dashboard-and-usage.md로, OpenAI 계정 운영은 providers/openai-accounts.md로 가요. 옮긴 글은 거의 그대로이고, 제목이 맨 위로 올라간 곳만 ### → ##로 올려요. 앵커 이름은 유지해요. 그 앵커를 가리키던 링크 172개와 결정 기록 14개를 새 문서로 고쳐요. 소스 쪽은 src/lib/upstream-retry.ts 주석 한 줄만 바뀌어요. 그리고 위에서 말한 여섯 소스 자리를 각각 맞는 문서에 새로 적어 넣어요. 끝나면 grace.oversizeDocs와 grace.undocumentedSourceAreas가 둘 다 비어요. 코드 동작은 거의 안 바뀌고, 구조 문서와 링크만 정리하는 PR이에요.

base는 dev가 아니라 #5593 브랜치(codex/remove-docs-pr-assets)예요. #5593이 먼저 들어가야 이 PR을 dev로 옮길 수 있어요. 분할 뒤 줄 수는 모두 600 아래예요(가장 긴 쪽이 wire-shapes 483, dashboard 492). CI 빨간 표시는 대부분 cancelled라서, 내용이 깨져서 실패한 걸로 보이지는 않아요.

structure/dashboard-and-usage.md · Quota-reset notifications - “섹션이 없거나 sink가 없으면 감지·전달·쓰기가 없다”고 적혀 있어요. 감지와 전달은 맞아요. 쓰기까지 없다고 하면 너무 세요. 알림을 예전에 켠 뒤 끄거나 지운 설치에서는 clearAccountQuota → forgetQuotaBaseline → forgetLastObservedWindows가 예전 baseline을 지우려고 디스크에 다시 쓸 수 있어요. 소스가 “sink가 없어도 돌아간다”고 분명히 말해요. 이 문장을 감지/전달(또는 한 번도 안 켠 설치)으로 좁히거나, 정리용 쓰기는 따로 적어야 해요.

structure/manifest.json · Responses 문서 네 장 - src/bridge/, src/responses/, src/server/, src/lib/가 여러 문서의 documents에 겹쳐요. 예전부터 있던 패턴이지만, 이번 분할로 Responses 쪽이 더 겹쳤어요. 게이트는 통과해도 “이 소스는 어느 문서가 주인인가”가 흐려져요.

메인테이너의 판단이 필요한 지점

#5593이 아직 열려 있어요. 이 PR을 #5593 머지 직후 dev로 리타겟할지, 아니면 스택 상태로 리뷰만 끝낼지 정해 주세요. 알림 “쓰기 없음” 문장은 이 PR에서 고칠지, 후속 한 줄 수정으로 뺄지도 정해 주세요. grace.unboundInvariants(INV-HOME-01, INV-SLUG-01)는 이번 범위 밖이고 테스트가 필요해요. 그대로 두는 게 맞는지 확인해 주세요.

너의 추천

알림 문장의 “written” 주장을 소스와 맞게 고친 뒤, #5593이 dev에 들어가면 이 PR base를 dev로 바꾸고 structure/hygiene가 초록인지 확인한 다음 합치세요. manifest documents 겹침은 이번에서 크게 손대지 마세요. 게이트를 비우는 목적과는 별개예요. 동작 코드 리그레션 걱정은 거의 없어요. 문서·링크 정확성만 보면 됩니다.

이 댓글은 grok-bot이 작성했습니다

Base automatically changed from codex/remove-docs-pr-assets to dev September 23, 2026 03:03
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed.

Hygiene

✅ Deterministic PR hygiene checks passed.

@github-actions
github-actions Bot marked this pull request as draft September 23, 2026 03:03
@github-actions
github-actions Bot marked this pull request as ready for review September 23, 2026 03:16
@lidge-jun
lidge-jun merged commit bd3049e into dev Sep 23, 2026
26 of 27 checks passed
@lidge-jun
lidge-jun deleted the codex/structure-tidy branch September 23, 2026 03:28
@lidge-jun

Copy link
Copy Markdown
Owner Author

Landed on dev as bd3049e in the 2026-09-23 landing round.

  • Head: 916a30aa8a2582dbaae5492ee1edaabc6e7eac33
  • Exact-head ci and structure gate: success
  • Rebuilt on dev after chore(repo): retire docs/ and host PR screenshots on the pr-assets branch #5593 landed, by merging dev into this branch; the PR diff is the 46-file structure refactor only
  • Merge result: clean git merge-tree against dev, file-size ratchet 0 offenders
  • Landing review: LAND. A statement-by-statement check found no invariant from dev lost in the split, manifest ownership is complete, and the notifier cleanup wording now matches the source.

Full-platform CI runs on dev once the round is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant