Skip to content

test(layout): move server, storage, ci-workflows into tests/<domain>/ (#3497) - #3518

Merged
lidge-jun merged 5 commits into
devfrom
codex/layout-slice6-server-storage-ci
Sep 4, 2026
Merged

test(layout): move server, storage, ci-workflows into tests/<domain>/ (#3497)#3518
lidge-jun merged 5 commits into
devfrom
codex/layout-slice6-server-storage-ci

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

Last move slice of #3497, stacked on #3516: server (96), storage (18) and ci-workflows (28) move into tests/<domain>/ with git mv. After this PR the only *.test.ts files at the tests/ root are the two layout guards; every other test lives under its domain (plan.ts: 0 moves left).

This slice carries the path edits the plan reserved for last: the storage-policy job list in ci.yml, scripts/release.ts ISOLATED_TEST_FILES, the api-usage job line, dev-version-bump.yml's release-version-line invocations, the .github/scripts/pr-quality.test.cjs fixtures, and the ci-workflows.test.ts / zz-ci-* oracles that pin them. scripts/test.ts gets codex-integration/issue-452-empty-503.test.ts and ci-workflows/release-helper.test.ts as serial-lane entries (the timeout table stays keyed by basename; the mover now only rewrites inside the array). .gitignore gains tests/**/.tmp-* so per-test scratch dirs stay ignored inside domain folders. Four MANUAL lines (new URL(entry.path, ...) over an array, test-runner's self-spawn) were hand-edited; keepAtRoot now beats the regex seeds in resolveTarget so the guards cannot be swept into ci-workflows/ by their test- prefix.

Verification

  • move.ts then verify.ts for the three domains: 0 stale literals, 0 unsuppressed escapes, 0 module-resolution errors; bun test --isolate --parallel=4 over the three directories: 2393 pass, 0 fail (142 files).
  • bun test tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/{test-runner,ci-workflows,zz-ci-storage-policy-isolation,zz-ci-api-usage-isolation,repo-hygiene}.test.ts: 209 pass. node --test .github/scripts/pr-quality.test.cjs green.
  • bun x tsc --noEmit, bun run privacy:scan: green.
  • Exact-head ci: the storage-policy and api-usage isolated jobs are the direct proof for the three-way edit.

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

  • Tests

    • Reorganized test coverage into CI workflow, server, and storage areas.
    • Corrected test imports, repository path resolution, and isolated test references after the reorganization.
    • Expanded focused validation to include server image and search coverage.
    • Added regression coverage for documentation claims about 429 failover behavior.
  • Documentation

    • Updated workflow, development, maintenance, and implementation-plan references to the reorganized test locations.
  • Chores

    • Added ignore rules for temporary artifacts generated in nested test directories.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 4, 2026 19:53
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 435e6a59-99d4-4c01-9e7c-c08a3c724138

📥 Commits

Reviewing files that changed from the base of the PR and between bdafc51 and 33ffae2.

📒 Files selected for processing (172)
  • .github/scripts/pr-quality.test.cjs
  • .github/workflows/ci.yml
  • .github/workflows/dev-version-bump.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/release.yml
  • .gitignore
  • AGENTS.md
  • AGENTS_INSTALL.md
  • MAINTAINERS.md
  • docs/superpowers/plans/2026-07-26-oauth-reliability-integrity.md
  • docs/superpowers/plans/2026-07-28-pr-quality-gates.md
  • docs/superpowers/plans/2026-08-06-deepseek-responses-streaming-terminal-repair.md
  • docs/superpowers/plans/2026-08-13-cl10-deep-review-hardening.md
  • docs/superpowers/specs/2026-07-28-pr-quality-gates-design.md
  • gui/src/api-targets.ts
  • scripts/bump-dev-version.ts
  • scripts/generate-ocx-skill-surface.ts
  • scripts/openai-provider-option-final-gates.ts
  • scripts/release.ts
  • scripts/test-layout/layout.json
  • scripts/test.ts
  • src/server/auth-cors.ts
  • src/server/index.ts
  • src/server/management/route-registry.ts
  • src/server/responses/responses-field-backfill.ts
  • structure/06_docs-and-release.md
  • tests/ci-workflows/assert-mergeable-review.test.ts
  • tests/ci-workflows/build-release-changelog.test.ts
  • tests/ci-workflows/bump-dev-version.test.ts
  • tests/ci-workflows/bun-runtime.test.ts
  • tests/ci-workflows/ci-workflows.test.ts
  • tests/ci-workflows/cleanup-orphaned-workflows.test.ts
  • tests/ci-workflows/closed-pr-branch-cleanup.test.ts
  • tests/ci-workflows/compatibility-version.test.ts
  • tests/ci-workflows/docs-429-failover-claims.test.ts
  • tests/ci-workflows/docs-bun-source-requirement.test.ts
  • tests/ci-workflows/dsh-path-contract.test.ts
  • tests/ci-workflows/dsh-rc6-compat-script.test.ts
  • tests/ci-workflows/dsh-writer-lock.test.ts
  • tests/ci-workflows/fixture-dir-uniqueness.test.ts
  • tests/ci-workflows/install-scripts.test.ts
  • tests/ci-workflows/keyring-smoke.test.ts
  • tests/ci-workflows/package-tree-integrity.test.ts
  • tests/ci-workflows/privacy-scan-meta-key.test.ts
  • tests/ci-workflows/release-helper.test.ts
  • tests/ci-workflows/release-notes.test.ts
  • tests/ci-workflows/release-version-line.test.ts
  • tests/ci-workflows/repo-hygiene.test.ts
  • tests/ci-workflows/skill-ocx.test.ts
  • tests/ci-workflows/test-home-guard.test.ts
  • tests/ci-workflows/test-runner.test.ts
  • tests/ci-workflows/zz-ci-api-usage-isolation.test.ts
  • tests/ci-workflows/zz-ci-storage-policy-isolation.test.ts
  • tests/ci-workflows/zz-pr-coderabbit-readiness-revalidation.test.ts
  • tests/claude-integration/claude-cli.test.ts
  • tests/helpers/enforce-pr-target-harness.ts
  • tests/providers/aside-client.test.ts
  • tests/server/account-import.test.ts
  • tests/server/account-pool-management-api.test.ts
  • tests/server/adapter-resolve.test.ts
  • tests/server/agent-task-recovery-cache.test.ts
  • tests/server/agent-task-recovery-combo.test.ts
  • tests/server/agent-task-recovery-fallback.test.ts
  • tests/server/agent-task-recovery-security.test.ts
  • tests/server/agent-task-recovery.test.ts
  • tests/server/alias-management-api.test.ts
  • tests/server/api-access-endpoints.test.ts
  • tests/server/api-catalog-route.test.ts
  • tests/server/api-codex-log-guard-compact.test.ts
  • tests/server/api-codex-log-guard-protection.test.ts
  • tests/server/api-codex-log-guard.test.ts
  • tests/server/api-debug.test.ts
  • tests/server/api-key-attribution.test.ts
  • tests/server/api-keys-routes.test.ts
  • tests/server/api-usage.test.ts
  • tests/server/bounded-body.test.ts
  • tests/server/bridge-live-delivery.test.ts
  • tests/server/cancel-body-on-abort.test.ts
  • tests/server/config.test.ts
  • tests/server/consume-for-inspection-cancel.test.ts
  • tests/server/data-plane-admission-identity.test.ts
  • tests/server/debug-settings.test.ts
  • tests/server/error-fidelity.test.ts
  • tests/server/errors-adapter-failure.test.ts
  • tests/server/fetch-header-timeout.test.ts
  • tests/server/health-scoring.test.ts
  • tests/server/input-admission.test.ts
  • tests/server/local-management-attestation.test.ts
  • tests/server/local-management-capability.test.ts
  • tests/server/local-management-direct-transport.test.ts
  • tests/server/local-provider-reload-client.test.ts
  • tests/server/logs-timezone.test.ts
  • tests/server/loopback-listener-admission.test.ts
  • tests/server/loopback-listener-integration.test.ts
  • tests/server/management-api-logs-metrics.test.ts
  • tests/server/management-client-config-route.test.ts
  • tests/server/management-integration-journal-delete.test.ts
  • tests/server/management-integration-routes.test.ts
  • tests/server/management-origin-tls.test.ts
  • tests/server/management-provider-validation.test.ts
  • tests/server/management-route-registry.test.ts
  • tests/server/memory-watchdog.test.ts
  • tests/server/model-discovery-management-api.test.ts
  • tests/server/outbound-body-guard.test.ts
  • tests/server/owned-service-home.test.ts
  • tests/server/passive-route-linker.test.ts
  • tests/server/port-reclaim.test.ts
  • tests/server/ports.test.ts
  • tests/server/proxy-env.test.ts
  • tests/server/proxy-liveness.test.ts
  • tests/server/relay-eager.test.ts
  • tests/server/response-model-identity.test.ts
  • tests/server/retry-after-429.test.ts
  • tests/server/route-decision-trace.test.ts
  • tests/server/server-403-permission-e2e.test.ts
  • tests/server/server-auth.test.ts
  • tests/server/server-background-lifecycle.test.ts
  • tests/server/server-clickjacking-headers.test.ts
  • tests/server/server-combo-failover-e2e.test.ts
  • tests/server/server-images-bodyless-content-length.test.ts
  • tests/server/server-images.test.ts
  • tests/server/server-key-failover-e2e.test.ts
  • tests/server/server-kiro-completion-e2e.test.ts
  • tests/server/server-kiro-oauth-401-replay.test.ts
  • tests/server/server-live.test.ts
  • tests/server/server-loopback-host-gate.test.ts
  • tests/server/server-management-auth.test.ts
  • tests/server/server-opencode-go-goal-streaming.test.ts
  • tests/server/server-rate-limit-retry-e2e.test.ts
  • tests/server/server-request-body-size.test.ts
  • tests/server/server-search.test.ts
  • tests/server/server-stop-config-hardening.test.ts
  • tests/server/server-xai-chat-reasoning-streaming.test.ts
  • tests/server/server-xai-header-parity.test.ts
  • tests/server/server-xai-oauth-401-replay.test.ts
  • tests/server/server-xai-responses-streaming.test.ts
  • tests/server/session-affinity.test.ts
  • tests/server/session-lane-recall-harness.test.ts
  • tests/server/sidebar-routes.test.ts
  • tests/server/sidebar-star-state.test.ts
  • tests/server/startup-action-control-elevation.test.ts
  • tests/server/startup-action-control.test.ts
  • tests/server/startup-prompt.test.ts
  • tests/server/stream-aborted-marker.test.ts
  • tests/server/system-env.test.ts
  • tests/server/system-restart.test.ts
  • tests/server/system-routes.test.ts
  • tests/server/terminal-guard-server.test.ts
  • tests/server/terminal-guard.test.ts
  • tests/server/upstream-connect-error.test.ts
  • tests/server/upstream-http-version.test.ts
  • tests/server/v2-agent-message-failfast.test.ts
  • tests/service/process-state.test.ts
  • tests/storage/api-storage-cleanup.test.ts
  • tests/storage/api-storage-policy-already-running.test.ts
  • tests/storage/api-storage-policy-mutation-busy.test.ts
  • tests/storage/api-storage-policy-put-race.test.ts
  • tests/storage/api-storage-policy-run.test.ts
  • tests/storage/api-storage-policy.test.ts
  • tests/storage/api-storage.test.ts
  • tests/storage/storage-cleanup.test.ts
  • tests/storage/storage-mutation-race.test.ts
  • tests/storage/storage-policy-config-race.test.ts
  • tests/storage/storage-policy-job-responsive.test.ts
  • tests/storage/storage-policy.test.ts
  • tests/storage/storage-restore-job-errors.test.ts
  • tests/storage/storage-restore-job-responsive.test.ts
  • tests/storage/storage-scanner.test.ts
  • tests/storage/storage-worker-lifecycle.test.ts
  • tests/storage/storage-worker-os-join-settle.test.ts
  • tests/storage/storage-worker-teardown-isolate.test.ts
  • tests/test-layout-tooling.test.ts

📝 Walkthrough

Walkthrough

This change moves CI workflow, server, and storage tests into domain directories. It updates imports, fixtures, workflow commands, scripts, documentation, comments, and repository-root path resolution. It also adds documentation-claim coverage for 429 failover behavior.

Changes

Test layout migration

Layer / File(s) Summary
Repository references and execution commands
.github/..., AGENTS.md, docs/..., scripts/..., structure/..., .gitignore, src/..., gui/...
Repository commands, comments, documentation, fixtures, ignore rules, and layout metadata now reference relocated tests.
CI workflow test relocation
tests/ci-workflows/*
CI workflow tests now resolve source files, helpers, fixtures, and repository paths from their nested directory. A new test validates 429 failover documentation claims.
Server test relocation
tests/server/*, tests/claude-integration/..., tests/providers/...
Server test imports, dynamic imports, fixture reads, subprocess paths, and related comments now match the tests/server/ location.
Storage test relocation
tests/storage/*
Storage test imports and CI isolation references now match the tests/storage/ location.

Estimated code review effort: 3 (Moderate) | ~20 minutes

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/layout-slice6-server-storage-ci

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.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 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-04T21:58:27.507806Z 33ffae2 Draft marked ready
ℹ️ 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 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • UI screenshot required.

What to do

  • Add a screenshot of the UI change to the PR description.

Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required enforce-target check will keep failing until every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft September 4, 2026 19:53
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 62 / 80

이 PR은 이슈 #3497(테스트 파일을 tests/<도메인>/으로 옮기고 macOS CI를 나누는 작업)의 마지막 이사 슬라이스입니다. 지금 dev HEAD는 95164a429이고, 방금 #3514(admin-token 유닛 마무리 데브로그 + preload guard 기록)가 들어갔습니다. 그 전에 #3509가 windows/service/update를 이미 dev에 넣었고, 아직 열린 스택은 #3510#3511#3513#3516이번 #3518 순서입니다. 이 PR의 베이스는 dev가 아니라 #3516 헤드 codex/layout-slice5-providers-codex입니다. 지금은 draft입니다.

옮기는 묶음은 server(약 96)·storage(약 18)·ci-workflows(약 28)입니다. git mvtests/<domain>/ 아래로 보내고, scripts/test-layout/layout.jsonmigrated에 세 도메인을 넣습니다. 본문 주장대로, 이 슬라이스 뒤에는 tests/ 루트에 남는 *.test.ts가 레이아웃 가드 두 개(test-layout.test.ts·test-layout-tooling.test.ts)뿐이어야 합니다. keepAtRoot에도 그 두 가드와 preload.ts·fake-codex-server.ts 등이 고정되어 있습니다.

이번 슬라이스가 특히 중요한 이유는 CI·릴리스 경로 문자열이 여기 몰려 있기 때문입니다. .github/workflows/ci.yml의 storage-policy / api-usage 격리 잡, scripts/release.tsISOLATED_TEST_FILES, dev-version-bump.ymlrelease-version-line 호출, .github/scripts/pr-quality.test.cjs 픽스처, ci-workflows.test.ts·zz-ci-* 오라클이 전부 새 경로를 가리키도록 같이 바뀝니다. 앞 슬라이스에서 파일을만 옮기고 여기를 빼먹으면 CI가 옛 경로를 찾아 깨집니다.

도구 쪽도 두 군데 손봤습니다. (1) schema.tsresolveTarget에서 keepAtRoot가 regex seed보다 먼저 이깁니다. 그래서 test-로 시작하는 가드 파일이 ci-workflows/로 쓸려 들어가지 않습니다. (2) move.tsscripts/test.ts를 고칠 때 타임아웃 테이블(basename 키)은 건드리지 않고 SERIAL_FULL_SUITE_FILES 배열 안만 바꿉니다. 시리얼 레인에 codex-integration/issue-452-empty-503.test.tsci-workflows/release-helper.test.ts가 들어갑니다. .gitignore에는 tests/**/.tmp-*가 추가되어 도메인 폴더 안의 임시 스크래치도 무시합니다.

검증 메모: 세 도메인 move.ts/verify.ts는 stale/escape/module-resolution 0, isolate 2393 pass(142 files), 레이아웃·ci-workflows·pr-quality·tsc·privacy는 초록이라고 합니다. Exact-head CI에서 storage-policy·api-usage 격리 잡이 직접 증거입니다. 지금 체크는 test 1–4/4·gates·hygiene·storage policy·api usage 등은 통과 쪽이고, macos/keyring 일부는 pending이며, enforce-target 실패는 non-dev 베이스 스택에서 흔히 나는 신호입니다. 제품 런타임보다 #3497 열차를 끝내는 chore이라 우선순위는 중상(62)입니다.

참고로 layout.json 도메인 맵에는 아직 e2e-style·images·videosmigrated에 없습니다. 본문이 “0 moves left”라고 하니 옮길 파일이 이미 없거나 다른 규칙으로 남는 칸일 수 있습니다. 열차가 dev에 다 앉은 뒤 그 세 칸을 비울지·남길지는 메인테이너가 한 번만 확인하면 됩니다.

scripts/test-layout/schema.ts resolveTarget - keepAtRoot가 이제 regex보다 먼저라서, 가드 파일 이름이 도메인 seed에 걸려도 루트에 남습니다. 의도한 안전장치입니다.
scripts/test-layout/move.ts SERIAL rewrite - 타임아웃 테이블을 basename으로 유지하고 배열 경로만 고칩니다. 앞 슬라이스와 계약이 맞습니다.
.github/workflows/ci.yml storage-policy / api-usage - 경로가 tests/storage/...·tests/server/api-usage.test.ts로 바뀌었습니다. 이 잡이 초록이어야 이 슬라이스의 핵심 증거가 됩니다.
enforce-target 체크 - 베이스가 dev가 아니라서 fail이 납니다. 스택 머지 순서 문제이지 이 PR만의 버그는 아닙니다.
PR이 draft - 리뷰 코멘트는 달지만, ready 전환은 메인테이너 타이밍입니다.

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

너의 추천
부모 스택(#3510#3516)을 순서대로 dev에 올린 뒤, draft를 ready로 바꾸고 CI(특히 storage-policy·api-usage)가 초록이면 머지하세요. 지금은 리베이스로 앞당기지 말고 스택 순서를 지키세요. e2e-style/images/videos는 머지 후 plan이 정말 0인지 한 줄만 확인하고, 빈 칸이면 migrated에 넣거나 도메인 정의에서 빼는 follow-up을 짧게 남기면 됩니다.

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

@lidge-jun
lidge-jun force-pushed the codex/layout-slice6-server-storage-ci branch from 2426be1 to d97ea08 Compare September 4, 2026 20:25
@lidge-jun
lidge-jun force-pushed the codex/layout-slice5-providers-codex branch from 77190ee to 8ee99eb Compare September 4, 2026 20:25
@lidge-jun
lidge-jun force-pushed the codex/layout-slice5-providers-codex branch from 8ee99eb to 03433b1 Compare September 4, 2026 20:37
@lidge-jun
lidge-jun force-pushed the codex/layout-slice6-server-storage-ci branch 2 times, most recently from d901723 to 798e003 Compare September 4, 2026 20:55
Base automatically changed from codex/layout-slice5-providers-codex to dev September 4, 2026 21:06
@lidge-jun
lidge-jun force-pushed the codex/layout-slice6-server-storage-ci branch 2 times, most recently from 7a1dad7 to 5808a7f Compare September 4, 2026 21:24
@lidge-jun
lidge-jun marked this pull request as ready for review September 4, 2026 21:38
@github-actions
github-actions Bot marked this pull request as draft September 4, 2026 21:38
@lidge-jun
lidge-jun force-pushed the codex/layout-slice6-server-storage-ci branch from 5808a7f to 33ffae2 Compare September 4, 2026 21:38

@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: 5808a7f672

ℹ️ 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 AGENTS.md
`scripts/test-layout/move.ts` and `layout.migrated` records which domains
have moved, so until a domain is listed there its files are still at the
root. `tests/test-layout.test.ts` enforces the map. Shared helpers in
root. `tests/ci-workflows/test-layout.test.ts` enforces the map. Shared helpers in

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 Point agents at the root layout test

The layout guard remains tests/test-layout.test.ts and is explicitly listed in scripts/test-layout/layout.json under keepAtRoot; no tests/ci-workflows/test-layout.test.ts exists. When a contributor follows this path, Bun reports an unmatched filter but exits successfully, so the intended layout enforcement can be silently skipped. Keep this reference as tests/test-layout.test.ts.

Useful? React with 👍 / 👎.

@lidge-jun lidge-jun closed this Sep 4, 2026
@lidge-jun
lidge-jun deleted the codex/layout-slice6-server-storage-ci branch September 4, 2026 21:49
@lidge-jun
lidge-jun restored the codex/layout-slice6-server-storage-ci branch September 4, 2026 21:49
@lidge-jun lidge-jun reopened this Sep 4, 2026
@lidge-jun
lidge-jun marked this pull request as ready for review September 4, 2026 21:50
@lidge-jun
lidge-jun merged commit 79e0364 into dev Sep 4, 2026
46 of 50 checks passed
@lidge-jun
lidge-jun deleted the codex/layout-slice6-server-storage-ci branch September 4, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant