Repository navigation
refactor: rename @moca/knative-server to @moca/server - #804
Conversation
cwiklik
left a comment
There was a problem hiding this comment.
A clean, mechanical rename. I verified completeness against the real tree rather than the diff: no @moca/knative-server or packages/knative-server reference survives anywhere in the head tree, and none survives after merging the 112 commits main has gained since this branch forked — so the rename will not go stale on merge. DEFAULT_WORKER_ENTRY resolves to ../../server/src/worker.ts with its assertion updated, pnpm-workspace.yaml's packages/* glob needs no change, the lockfile touches only the importer key, and ADR-0041 gains a dated revision closing the follow-up it owed itself. The three inline findings are cosmetic or test-tightening; none blocks merge.
Two notes that are not yours to fix:
- GitHub shows
mergeable_state: dirty, but it is stale. Its cached base is6f9a736d, not currentmain(f60db301). A trial merge in a scratch worktree reports "Automatic merge went well." No rebase needed. - CI has not verified this PR. Only the DCO check ran (passing). The head is the fork
pdettori/mocaand there are zero workflow runs on999d2097, soci.yml(lint/typecheck/test) never fired. Verification currently rests on the local run reported in the body — worth approving the workflow run before merge on a 90-file refactor.
One pre-existing wart, mentioned not flagged: experiments/MOVED.md:18 is the only remaining knative-server path outside the deliberately-preserved ADRs/specs, but it was already broken before this PR — both the test it names and deploy/knative/ were deleted in 7299c05f, so renaming the path would not fix it. That paragraph is obsolete and belongs in its own issue.
Areas reviewed: TypeScript, Dockerfile, Shell, Docs, lockfile, commit/PR conventions, security, supply-chain gate
Agent/IDE config (.claude/.vscode): none — gate clean
Commits: 1, signed off (DCO passing)
Assisted-By: Claude Code
|
|
||
| > **Note:** The supervisor and its workers are the **same container image**: the supervisor forks | ||
| > `packages/knative-server/src/worker.ts` (the package name is historical — the code is | ||
| > `packages/server/src/worker.ts` — the code is |
There was a problem hiding this comment.
nit: orphaned closing paren. Removing (the package name is historical — left P6-load-bearing). with no opener, and the line now wraps short.
| > `packages/server/src/worker.ts` — the code is | |
| > `packages/server/src/worker.ts` — the code is P6-load-bearing. The "brain" (model inference + session logic) runs in a worker; the "hands" |
(then drop the now-duplicated > P6-load-bearing). The "brain" ... line below)
There was a problem hiding this comment.
Fixed in a583323 — the orphaned paren is gone and the note is rewrapped into two full lines.
| // `DEFAULT_WORKER_ENTRY` had ZERO test references, so the highest-risk integration in the | ||
| // slice ran only on a real VM. | ||
| expect(DEFAULT_WORKER_ENTRY).toMatch(/knative-server[/\\]src[/\\]worker\.ts$/); | ||
| expect(DEFAULT_WORKER_ENTRY).toMatch(/server[/\\]src[/\\]worker\.ts$/); |
There was a problem hiding this comment.
suggestion: this regex got strictly weaker. /server[/\\]src[/\\]worker\.ts$/ still matches the old knative-server/src/worker.ts, and any other *server/src/worker.ts — so it would no longer catch a regression that pointed the entry back at a stale path.
The comment just above calls this "the highest-risk integration in the slice," which argues for keeping the guard as tight as it was:
| expect(DEFAULT_WORKER_ENTRY).toMatch(/server[/\\]src[/\\]worker\.ts$/); | |
| expect(DEFAULT_WORKER_ENTRY).toMatch(/packages[/\\]server[/\\]src[/\\]worker\.ts$/); |
There was a problem hiding this comment.
Fixed in a583323. The pin is now /[/\\]packages[/\\]server[/\\]src[/\\]worker\.ts$/, anchored on the separator so knative-server/src/worker.ts no longer matches. It is the separator-anchored form from the later review, which also rejects a hypothetical foopackages/server/.... Re-ran real-worker.integration.test.ts: "is the default entry…" passes.
| WORKDIR /app/packages/knative-server | ||
| # Default entrypoint: the HTTP server (package name historical — ADR-0041). The P6 supervisor | ||
| WORKDIR /app/packages/server | ||
| # Default entrypoint: the HTTP server. The P6 supervisor |
There was a problem hiding this comment.
nit: same unrewrapped-comment artifact as the README one — "the HTTP server. The P6 supervisor" / "forks src/worker.ts instead" now breaks mid-sentence after the parenthetical was deleted. Cosmetic; rewrap or leave.
|
A note on merge order with three open PRs. #759, #789 and #790 change files under
Assisted-By: Claude Code |
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Summary
This PR is a mechanical rename of packages/knative-server → packages/server (@moca/server): 52 pure renames, plus reference updates in the Dockerfile, deploy scripts, supervisor, harness comments, docs and the lockfile, plus an ADR-0041 addendum. I found no remaining non-historical knative-server reference in code, CI or scripts, including against a local merge with current main (ccf393b). But the branch is 634 commits behind main, GitHub reports it dirty/not mergeable, and only DCO has run on this head. Typecheck, tests, the image build and k8s-kind-e2e have never exercised the rename. Please merge or rebase on main and get CI green. A local git merge-tree against ccf393b resolves without conflicts, so this should be cheap. After that, the two nits below are optional.
Author: pdettori (MEMBER — maintainer)
Areas reviewed: rename completeness (code, Dockerfile, shell, CI, lockfile), docs/ADR
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: not run (PR dirty; DCO only)
Also: docs/REORG-PLAN.md open question 7 ("knative-server rename …") could now be marked resolved.
Assisted-By: Claude Code
| // `DEFAULT_WORKER_ENTRY` had ZERO test references, so the highest-risk integration in the | ||
| // slice ran only on a real VM. | ||
| expect(DEFAULT_WORKER_ENTRY).toMatch(/knative-server[/\\]src[/\\]worker\.ts$/); | ||
| expect(DEFAULT_WORKER_ENTRY).toMatch(/server[/\\]src[/\\]worker\.ts$/); |
There was a problem hiding this comment.
nit: /server[/\\]src[/\\]worker\.ts$/ also matches the old knative-server/src/worker.ts, so this pin no longer proves the rename. Anchor it on the separator: /[/\\]packages[/\\]server[/\\]src[/\\]worker\.ts$/.
|
|
||
| // Exact entrypoint match — avoids a fragile substring | ||
| // match that would misfire for any argv path containing "knative-server". | ||
| // match that would misfire for any argv path containing "server". |
There was a problem hiding this comment.
nit: The rationale reads oddly now: a substring match on "server" would misfire for almost any path. Consider …for any argv path that merely contains "server" (e.g. another package's entrypoint). or simply drop the quoted name.
There was a problem hiding this comment.
Reworded in a583323: "a substring test on the file name would misfire for any other entrypoint whose path merely contains it (another package's server.ts, say)."
clawgenti
left a comment
There was a problem hiding this comment.
Summary
Mechanical rename of packages/knative-server → packages/server (@moca/server), re-reviewed on head 999d209. The rename itself is complete: no knative-server path or @moca/knative-server reference survives in the head tree outside deliberately-historical ADR/spec records, DEFAULT_WORKER_ENTRY, the Dockerfile, deploy scripts and the lockfile all name the new path, and DCO passes. The outstanding issue is unchanged from the previous review round: the branch is 634 commits behind main (merge-base 86d63503), GitHub reports it not mergeable (dirty), and only DCO has run on this head — typecheck, tests, image build and e2e have never exercised the rename. A local git merge-tree of this head against current main (ccf393b8) resolves with zero conflicts, so a rebase/merge-and-rerun should be cheap. Recommend updating the branch and getting CI green before merge.
nit — docs/REORG-PLAN.md still lists the knative-server rename as an open question; now that it has landed here, that entry could be marked resolved (or pointed at this PR / ADR-0041's addendum). Not blocking.
Author: pdettori (MEMBER — maintainer)
Areas reviewed: rename completeness (code, Dockerfile, shell, lockfile), docs/ADR
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: DCO pass; all other checks not run (PR reported dirty)
Verified on head 999d209: full-tree grep for knative-server/@moca/knative-server (only historical ADR/spec hits), git merge-tree --write-tree against origin/main ccf393b (clean), gh pr checks, and gh api mergeable state.
Generated by RepoMan github-pr-review@235a7f7 (https://github.com/rossoctl/agent-skills/blob/235a7f7620139ee3e4ab0872b8439591fe52e8c1/skills/github-pr-review/SKILL.md).
clawgenti
left a comment
There was a problem hiding this comment.
(Marker for the review bot — see the full review above for the substantive findings.)
Generated by RepoMan github-pr-review@235a7f7 (https://github.com/rossoctl/agent-skills/blob/235a7f7620139ee3e4ab0872b8439591fe52e8c1/skills/github-pr-review/SKILL.md).
The package was never Knative-specific: it is the data-plane HTTP server and the P6 worker entrypoint the supervisor forks. ADR-0041 kept the code as P6-load-bearing and called the name historical; the rename decision it left owed lands here. - packages/knative-server -> packages/server, @moca/knative-server -> @moca/server - the supervisor's DEFAULT_WORKER_ENTRY, the Dockerfile COPY/WORKDIR, the compose image test and current docs name the new path - ADRs, specs and the reorg plan keep the old name as historical records; ADR-0041 gains a 2026-11-12 revision noting the rename Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
- the DEFAULT_WORKER_ENTRY pin anchors on packages/server, so it no longer also matches the old knative-server path - README and Dockerfile comments rewrapped where the "name historical" parenthetical was removed (README lost an orphaned closing paren) - server.ts's isMainModule rationale no longer hinges on the word "server" - REORG-PLAN open question 7 records the rename as answered Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
999d209 to
a583323
Compare
|
Review round addressed (head
This is a fork-head PR, so Assisted-By: Claude Code |
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Summary
Follow-up to our REQUEST_CHANGES at 999d209. The branch is now rebased onto current main (a7d568d, 0 behind, mergeable), so the blocker is gone. CI ran on the rename this time. I checked the rebase with git range-diff: the only differences in the rename commit come from main's own context. a583323 closes both of our nits and cwiklik's three: the worker-entry pin is separator-anchored (/[/\\]packages[/\\]server[/\\]src[/\\]worker\.ts$/), the isMainModule rationale is reworded, the README orphaned paren is gone, and the Dockerfile comment is rewrapped. REORG-PLAN Q7 is marked partly answered. The tree has no packages/knative-server directory. Outside the historical ADRs/specs, no knative-server / @moca/knative-server reference remains in code, CI, deploy or scripts. Renamed files differ from their originals only by the name/comment/pathspec updates.
Optional: experiments/MOVED.md:18 still cites packages/knative-server/test/swebench-sandbox-pool.test.ts. That test doesn't exist at either path, so the line was already stale and can be fixed separately.
Author: pdettori (MEMBER — maintainer)
Areas reviewed: rename completeness (code, Dockerfile, shell, CI, lockfile), docs/ADR, prior review threads
Agent/IDE config (.claude/.vscode): none
Commits: 2 commits, all signed-off: yes
CI status: green except k8s-kind-e2e, deploy-scripts, deploy-scripts-bash32 (pending at draft time)
Assisted-By: Claude Code
Upstream main at 032c8f6 (merge of rossoctl#818). Brings, since ccf393b: - rossoctl#819: the retire/reject guard for an active session pinned to a build, with ownership.ts's index of the sessions pinned to each build; - rossoctl#804: packages/knative-server renamed to packages/server; - rossoctl#818: a registered build is reused only while a fresh host holds its snapshot (no fresh host at all: reused as before), and a supersede at registration narrowed to rebuildOf-flagged rebuilds (excludes the reporting host, records claim.held, moves the leases); buildById and buildByRef. The fork carried earlier ports of rossoctl#818 and rossoctl#819 (d43a7a8 stillHeld; 144314a and e674b3c the pinned-session retire guard and its pruning). Upstream's versions win. Conflicts, each resolved to upstream's side: - docs/api/openapi.yaml: the create's reuse paragraph (fresh hosts, supersede) and retire's build_in_use wording. - packages/control-plane/src/ownership.ts: buildSessionsKey's comment (retire or reject), indexSession and cascadeDelete's key local, and hasActiveSessionOnBuild's comment. - packages/control-plane/src/sandbox-handlers.ts: stillHeld (fresh hosts, heldFresh, no fresh host means reuse) and buildsInUse's comment. - packages/control-plane/test/activation.test.ts: the pinned-session retire test and the pruning test, as upstream has them. - packages/control-plane/test/template-create.test.ts: the reuse test, plus upstream's stale-host and no-fresh-host cases. After the resolution these five files are byte-identical to upstream's, so no fork duplicate of the ports remains. CHANGELOG.md is upstream's. No fork-only file references packages/knative-server. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Rong Chang <[email protected]>
What
Renames
packages/knative-servertopackages/serverand@moca/knative-serverto@moca/server.The package was never Knative-specific: it is the data-plane HTTP server and the P6 worker entrypoint the supervisor forks. ADR-0041 kept the code as P6-load-bearing and called the name historical; the rename decision it left owed lands here.
git mv packages/knative-server packages/server(history preserved)package.jsonname →@moca/serverDEFAULT_WORKER_ENTRY, DockerfileCOPY/WORKDIR, the compose image test, the microvm smoke script, and live docs now name the new pathharness,control-plane,k8s-sandbox,supervisorpnpm-lock.yamlimporter key renamed (no other lock change)Historical records
ADR bodies, specs and
docs/REORG-PLAN.mdkeep the old name deliberately — they record what the package was called then. ADR-0041 gains a dated2026-11-12 — the package renamedrevision noting the change.Verification
pnpm -r typecheck— pass (all workspace packages)deploy/compose/tests/images.test.sh— pass.ts/.md/.yaml/.json— clean (shell scripts are not parsed by Prettier)Assisted-By: Claude Code