Skip to content

docs: remove obsolete docs and fix stale references - #1988

Merged
hatayama merged 9 commits into
v3-betafrom
docs/refresh-stale-docs
Jul 25, 2026
Merged

hatayama merged 9 commits into
v3-betafrom
docs/refresh-stale-docs

Conversation

@hatayama

@hatayama hatayama commented Jul 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Audited every file under docs/ against the code, scripts, and workflows they describe. Six documents no longer described anything that exists, and three carried factual errors that would mislead a reader who trusted them. Removed the former, corrected the latter, and gave the survivors a path from AGENTS.md.

Removed (6 files, all completed-work artifacts)

File Why
docs/architecture/execute-dynamic-code-windows-handoff.md Premised on the branch codex/rebuild-execute-dynamic-code, which no longer exists. 8 of its 9 referenced paths are gone. Ends with a "paste this into Windows Codex" prompt.
docs/architecture/native-cli-simplification-plan.md Proposes a single cli module with internal/{cli,unityipc,...}. The actual layout is cli/{common,dispatcher,project-runner,release-automation}, and ADR 0002 settled the dispatcher/runner split deliberately. Also held the stale --wait-for-domain-reload example.
docs/architecture/unity-cli-loop-onion-refactor-plan.md Record of a finished refactor, still written as a forward-looking plan ("Create branch...", "Test Plan").
docs/architecture/execute-dynamic-code-rebuild.md Born in f48cdaae (PR #901) as the design memo for that rebuild. The rebuild shipped; the memo described a PrewarmDynamicCodeUseCase that no longer exists.
docs/execute-dynamic-code-examples.md A generic Unity cookbook — 16 of 17 examples had nothing to do with uloop. Its central heredoc technique was superseded by --code-file, which the doc never mentioned.
docs/execute-dynamic-code-run-log.md A one-off benchmark log from 2026-04-16, referenced by nothing.

Verified after deletion that no file in the repository references any of them.

Corrected

  • docs/glossary.md — described the server and CLI as talking over TCP. There is no TCP path: BridgeTransportEndpoint offers UnixDomainSocket and WindowsNamedPipe only.
  • docs/github-actions-security.md — told the reader to run the architecture tests from cli, which is not a Go module. Corrected to cli/release-automation; the documented command now passes as written.
  • docs/code-complexity.md — stated a threshold of 25. Both declarations (MAX_COMPLEXITY in scripts/check-code-complexity.sh, cyclop.max-complexity in cli/.golangci-complexity.yml) say 15. Also replaced the "first rollout is advisory" framing, which read as provisional years after the fact, with what the advisory mode actually demands of a reader.

Discoverability

Seven files under docs/ had no path from AGENTS.md, so an agent reading only the repository guidelines never learned they existed. Rather than appending a flat index — which does not fire at the moment it is needed — each doc's rule now sits where it applies: the glossary beside the naming policy, action SHA pinning under CI automation language, and new sections for the complexity threshold and broken-release recovery. The repository map gained a docs/ entry, which also covers docs/adr/.

Verification

  • No repository-wide references remain to any deleted file.
  • go test ./internal/architecture -run 'TestWorkflowActions|TestPullRequestWorkflow' -count=1 passes from the directory the corrected doc names.
  • Transport claim checked against BridgeTransportEndpoint.cs; complexity threshold checked against both declaration sites.
  • Every docs/*.md is now reachable from AGENTS.md, directly or through one hop.

No code, script, or workflow changed, and docs/ belongs to no release-please package root — no release-trigger follow-up applies.

Follow-up

Two dead symbols surfaced during the audit are tracked separately in #1987, together with the exemption attribute and CI gating discussed there.

Review in cubic

hatayama added 9 commits July 25, 2026 15:20
Remove four documents under docs/ that no longer describe anything that
exists in the repository:

- execute-dynamic-code-windows-handoff.md was a one-off handoff note for
  resuming work on branch `codex/rebuild-execute-dynamic-code`, which no
  longer exists. Eight of the nine source paths it tells the reader to
  open are gone, because the onion refactor moved the whole pipeline
  under Packages/src/Editor/FirstPartyTools/ExecuteDynamicCode/. It also
  ends with a "paste this into Windows Codex" prompt, so it was never
  meant to outlive that session.

- native-cli-simplification-plan.md proposed consolidating the Go modules
  into a single `cli` module with internal/{cli,unityipc,project,...}
  packages. The repository instead runs cli/{common,dispatcher,
  project-runner,release-automation}, and ADR 0002 records the deliberate
  decision to keep the dispatcher/runner split. Its verification snippet
  also still used the pre-V3 `uloop compile --wait-for-domain-reload`
  spelling, which V3 replaced with `--no-wait-for-domain-reload`.

- unity-cli-loop-onion-refactor-plan.md was the working record of a
  finished refactor, still written as a plan ("Create branch...",
  "Test Plan"). The resulting structure is now enforced by the asmdef
  dependency tests it describes, so the document adds nothing a reader
  cannot get from the code.

- execute-dynamic-code-run-log.md listed the snippets used in a single
  benchmark session on 2026-04-16.

Nothing else in the repository linked to any of them except the handoff
note, which linked to the rebuild doc and to itself.
The Server and CLI entries described the Unity-side endpoint as a TCP IPC
endpoint. There is no TCP listener in the package: BridgeTransportEndpoint
resolves to BridgeTransportKind.UnixDomainSocket on macOS/Linux and
BridgeTransportKind.WindowsNamedPipe on Windows, which is also what the
repository guidelines state.

Since the glossary is the reference other docs and reviews are supposed to
follow, a wrong transport here propagates into anything written against it.
Two documented commands could not work as written.

github-actions-security.md told the reader to run the workflow-pinning
tests "from `cli`". `cli` is only a go.work root with no test packages;
the tests live in cli/release-automation/internal/architecture. Ran the
command from the corrected directory to confirm it passes.

execute-dynamic-code-examples.md passed `--parameters '[6,7]'` and read
the values back as `parameters[0]`. ExecuteDynamicCodeSchema.Parameters
is a Dictionary<string, object>, so the flag takes a JSON object and the
values arrive under `param0`/`param1` — the array form never bound. The
values also arrive boxed, so a direct `(int)` cast is not enough. The
replacement example was run against a live Editor and returns 42.

Added the "advanced, usually unnecessary" note the tool's skill file
already carries, so the example does not read as the default way to pass
data into a snippet.
The document still described a prewarm use case that no longer exists.
`IPrewarmDynamicCodeUseCase` / `PrewarmDynamicCodeUseCase` are gone, and
with them the `UnityCliLoopServerController -> PrewarmUseCase` entry edge:
server readiness is now `UnityCliLoopFirstPartyServerLifecycleBinding` in
the composition root, which warms the project IPC transport with the
internal `get-version` command and never enters this pipeline. Dynamic-code
warm-up moved into the pipeline itself, split across
`DynamicCodeForegroundWarmupRunner`, `DynamicCodeForegroundWarmupState`,
`ExecuteDynamicCodeReadinessProbe`, and `DynamicCodeForegroundWarmupSnippets`,
with `ExecuteDynamicCodeUseCase` running the foreground fallback. Added a
Warm-up module so the reason those four types share one snippet list —
no path may report warm while a shape the user hits first is still cold —
is visible in the diagram rather than only in the code comments.

Also corrected two edges that no longer exist. `DynamicCodeExecutionFacade`
does not touch `ICompiledAssemblyBuilder`; it depends on the executor pool
and `DynamicCodeExecutionScheduler`, which is what arbitrates foreground
versus idle-only execution. And the composition graph attributed the whole
compiler collaborator set to the registry, when `DynamicCodeServicesRegistry`
only wires runtime access — the planning, backend build, and safety/load
collaborators are built by `DynamicCodeCompiler`'s default constructor,
several hops away.

Named the assembly and folder the pipeline lives in at the top, so the
Entry/UseCase/Infrastructure headings are not misread as onion assemblies.
Of the 17 examples in this file, only the --parameters one carried
information specific to uloop. The rest were plain Unity API usage —
GameObject.Find, SceneManager.GetActiveScene, FindObjectsByType<Camera> —
which the tool's skill file explicitly tells the agent to write from its
own Unity knowledge instead of copying from a catalogue. The repository
already removed generic cookbooks from skill files for the same reason.

The "Long Examples" section made the file actively misleading. Its whole
premise was wrapping long snippets in CODE=$(cat <<'EOF' ... EOF), which
--code-file replaced; the skill file now routes shell-quoting trouble to
--code-file directly. This document never mentioned that flag, so its one
genuinely uloop-specific technique was the superseded one.
The Operating Policy still described the original rollout at a maximum
cyclomatic complexity of 25. The threshold has since been lowered to 15
in both places that declare it — MAX_COMPLEXITY in
scripts/check-code-complexity.sh and cyclop.max-complexity in
cli/.golangci-complexity.yml — and the workflow's artifact step passes 15
as well. Running the script locally prints "max 15" for both stacks.

The closing advice was inverted by the same drift: it told the reader not
to lower the repository-wide threshold yet, when it had already been
lowered. Replaced it with the guidance that actually matters for a check
that never fails the build — the report only helps if someone reads it.

Also named the two declaration sites and the workflow's trigger paths, so
the next threshold change has an obvious checklist and this document is
less likely to drift again.
Of the previous 314 lines, 144 were mermaid structure diagrams and 70 were
a one-line-per-class list. Both duplicate what the source already declares,
and both are what actually rotted: every error found in the preceding commit
lived in the diagrams — a use case that no longer exists, a facade edge to
ICompiledAssemblyBuilder that was never there, five dependencies attributed
to a registry that does not hold them.

The duplication is not worth carrying. The 101 files in this folder hold 263
summary and Why comments between them, and the repository's comment policy
requires the rationale to live there. So the diagrams competed with the code
for the same job and lost.

What is left is the part reading the code does not give you: the order to
read it in, the rule each module boundary was chosen to satisfy, and the
cross-cutting design intent. That content does not change when a class moves,
so this file should now stay true across refactors instead of needing a sweep
after each one.

Renamed the heading away from "rebuild", which described a migration that
finished rather than the document's subject.
This file was written as the design writeup for PR #901, "Rebuild
execute-dynamic-code with shared Roslyn compilation and layered
architecture" — the "rebuild" in its name was that PR's, not a description
of its subject. Its only inbound link was the Windows handoff note created
alongside it, and both were artifacts of that one migration. In the three
months since, it was never updated on purpose: each of its three edits came
from a rename sweep that happened to touch it.

Reducing it to the parts code cannot state left almost nothing standing.
The warm-up rationale it carried is already in the source three times over
(DynamicCodeForegroundWarmupRunner, ExecuteDynamicCodeReadinessProbe). The
server-readiness explanation is in
UnityCliLoopFirstPartyServerLifecycleBinding's own summary. The reading
order it prescribed is what following the delegation from
ExecuteDynamicCodeTool gives you anyway, and the dependency-direction rules
are enforced by the asmdef dependency tests rather than by prose.

A finished migration's design memo left in the tree gets read as a
description of current behavior. This one had already required two rounds
of correction for exactly that reason, which is the same failure the other
plan documents removed in this branch showed.

docs/architecture/ is now empty and goes away with it.
Seven files under docs/ had no path from AGENTS.md, so an agent reading only
the repository guidelines never learned they existed. Rather than append a flat
index, state each doc's rule where it fires: the glossary next to the naming
policy, action SHA pinning under CI automation language, and new sections for
the complexity threshold and broken-release recovery. Add a docs/ entry to the
repository map that also covers docs/adr/, which had none.

docs/dispatcher-pin-release-order.md stays reachable through
docs/project-runner-pin.md and needs no separate pointer.
@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4713ef42-74f9-4b0d-98e9-c9872a644dda

📥 Commits

Reviewing files that changed from the base of the PR and between 43c4c67 and 48e9d4a.

📒 Files selected for processing (10)
  • AGENTS.md
  • docs/architecture/execute-dynamic-code-rebuild.md
  • docs/architecture/execute-dynamic-code-windows-handoff.md
  • docs/architecture/native-cli-simplification-plan.md
  • docs/architecture/unity-cli-loop-onion-refactor-plan.md
  • docs/code-complexity.md
  • docs/execute-dynamic-code-examples.md
  • docs/execute-dynamic-code-run-log.md
  • docs/github-actions-security.md
  • docs/glossary.md
💤 Files with no reviewable changes (6)
  • docs/architecture/unity-cli-loop-onion-refactor-plan.md
  • docs/architecture/native-cli-simplification-plan.md
  • docs/execute-dynamic-code-run-log.md
  • docs/architecture/execute-dynamic-code-rebuild.md
  • docs/execute-dynamic-code-examples.md
  • docs/architecture/execute-dynamic-code-windows-handoff.md

📝 Walkthrough

Walkthrough

Repository guidance now covers glossary compliance, SHA-pinned GitHub Actions, broken CLI release handling, and code complexity. IPC terminology and complexity documentation were updated, a test command path was corrected, and several architecture and execution documents were removed.

Changes

Repository governance and documentation

Layer / File(s) Summary
Terminology and IPC documentation
AGENTS.md, docs/glossary.md
Repository terminology must follow the glossary, and Unity CLI IPC is documented as using Unix domain sockets or Windows named pipes, never TCP.
Automation and release guardrails
AGENTS.md, docs/github-actions-security.md
Workflow actions must use full commit SHAs; broken CLI release handling is documented, and the release automation test command uses its dedicated directory.
Code complexity policy
AGENTS.md, docs/code-complexity.md
The repository-wide complexity maximum is 15, enforcement declarations must remain synchronized, and the workflow reports findings without failing CI.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing obsolete docs and fixing stale references.
Description check ✅ Passed The description is directly related to the documentation audit, removals, and corrections in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/refresh-stale-docs

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.

@hatayama
hatayama merged commit 3505d20 into v3-beta Jul 25, 2026
9 checks passed
@hatayama
hatayama deleted the docs/refresh-stale-docs branch July 25, 2026 14:50
RyanXie123 pushed a commit to RyanXie123/unity-cli-loop that referenced this pull request Sep 22, 2026
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