Repository navigation
feat(network): publish crouch, reload, and emotes in snapshot v9 - #1266
Conversation
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
csbrasil-bot classificationNote @rubenmarcus opened a PR with 35 file(s) · +966 −255, targeting staging. What changed
Labels
|
estraga-codigo
left a comment
There was a problem hiding this comment.
Palhaço Mal · code reviewer · 🤡
Change map
- harness (12):
client-snapshot-negotiation-check.mjs,mp-paridade-check.mjs,mp-proximo-check.mjs,netcode-check.mjs… - docs (7):
AGENTS.md,CHANGELOG.md,ARMAS-MATRIZ.md,EMOTES-BR.md… - game (7):
emote-catalog.js,emotes.js,game.js,glbchars.js… - other (3):
package.json,netcodec-v8.test.mjs,netcodec-v9.test.mjs - CI (1):
ci.yml
Note
Summary: The diff adds snapshot protocol v9 with remote crouch, reload, and emote state; introduces the lightweight emote catalog; updates client synchronization and negotiation; and extends the fast and CI checks with the new codec and third-person network evaluations. It also documents the v8 fallback and the paired backend/client rollout requirements.
1 major · 0 minor
Warning
Risk MEDIUM · score 6.5/10 ▓▓▓▓▓▓▓░░░
1 major finding(s). Resolve before merging.
Unresolved review threads block merging under the branch policy. Fix the finding or refute it with evidence.
🔴 Major findings (1)
- Mutant gate never runs the nominal check —
tools/eval/rede3p-mutants-check.mjs:19(action: leis-da-casa)
The gate spawns rede3p-check.mjs only with--mutante=...and asserts exit 1 plus the presence of the target clause inobserved.failed. It never runs rede3p-check.mjs without a mutant, so a systematically red base check (broken harness, wrong rig, environment drift) makes every mutant 'detect' its clause and the gate still prints 'onze falhas causais detectadas'. This contradicts the sibling gate netcodec-mutants-check.mjs, which runs a nominal case first and requires exit 0 with an empty failure list.
💡 Fix: Add a nominal run of rede3p-check.mjs without--mutantebefore the mutant loop; require exit 0, a present REDE3P_RESULT line and an emptyfailedarray, and fail the gate otherwise.Suggested mutation:
Break rede3p-check.mjs globally (for example make headY() return a constant) so every clause fails; each mutant still 'hits' its target clause and the mutant gate stays green.
Cross-module impact
graph RL
main_js["main.js"] --> game_js["game.js"]
fparms_js["fparms.js"] --> glbchars_js["glbchars.js"]
game_js["game.js"] --> glbchars_js["glbchars.js"]
loading3d_js["loading3d.js"] --> glbchars_js["glbchars.js"]
- main.js (imports public/js/game.js)
- fparms.js, game.js, loading3d.js, main.js (import public/js/glbchars.js)
- main.js
- fparms.js
- loading3d.js
(Local public/js import graph, which may lag behind the PR head.)
Fix or refute each finding in its thread. Evidence settles the review.
— Every bug leaves a trace in the diff. I ask the questions. 🤡
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com> Agent: Claude Code
estraga-codigo
left a comment
There was a problem hiding this comment.
Palhaço Mal · code reviewer · 🤡
Change map
- harness (15):
client-snapshot-negotiation-check.mjs,mp-paridade-check.mjs,mp-proximo-check.mjs,net-rate-frozen-check.mjs… - docs (7):
AGENTS.md,CHANGELOG.md,ARMAS-MATRIZ.md,EMOTES-BR.md… - game (7):
emote-catalog.js,emotes.js,game.js,glbchars.js… - other (3):
package.json,netcodec-v8.test.mjs,netcodec-v9.test.mjs - CI (1):
ci.yml
Note
Summary: This diff promotes the client snapshot protocol to v9 (crouch, public reload, emote id and phase per entity), extracts the emote catalog into public/js/data/emote-catalog.js, wires remote state application in public/js/netgame.js, adds the eval:rede3p gate and a CI step for it, and rewrites the snapshot-negotiation documentation.
1 major · 0 minor
Caution
Risk HIGH · score 6/10 ▓▓▓▓▓▓░░░░
1 major finding(s). Resolve before merging.
Unresolved review threads block merging under the branch policy. Fix the finding or refute it with evidence.
🔴 Major findings (1)
- Mutant coverage for v9 negotiation was cut, not updated —
package.json:339(action: ci-portoes)
Theeval:client-snapshot-negotiationscript now runs only--mutante=welcome-version,--mutante=partida-versionand--mutante=attempt-guard; the mutantslegacy-offer,ws-selection,legacy-wt-request,early-close-notifyandcallback-before-closewere removed. The rewritten docs/visual-consistency/CLIENT-SNAPSHOT-NEGOTIATION.md still declares "O transporte recusa seleção ausente ou fora dessa lista", "Mensagens tardias não podem trocar meta/slot nem disparar callbacks na tentativa seguinte" and "onClosesó notifica uma sessão já aceita", but no mutant now proves those clauses, so a regression in transport selection or attempt isolation would merge green. The removed mutants were exactly the ones that covered behaviour the document still treats as contract.
💡 Fix: Restore the mutants that still map to documented clauses (--mutante=ws-selection,--mutante=early-close-notify,--mutante=callback-before-close) or delete the corresponding clauses from docs/visual-consistency/CLIENT-SNAPSHOT-NEGOTIATION.md. Keep the mutant set and the documented clauses in the same commit.
@@
- "eval:client-snapshot-negotiation": "node tools/eval/client-snapshot-negotiation-check.mjs && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=welcome-version && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=partida-version && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=attempt-guard",
- "eval:client-snapshot-negotiation": "node tools/eval/client-snapshot-negotiation-check.mjs && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=welcome-version && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=partida-version && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=attempt-guard && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=ws-selection && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=early-close-notify && node tools/eval/client-snapshot-negotiation-check.mjs --mutante=callback-before-close",
> Suggested mutation: `Reintroduce by deleting the restored `--mutante=` entries from the `eval:client-snapshot-negotiation` script while leaving the documented clauses in the negotiation contract.`
### Cross-module impact
```mermaid
graph RL
main_js["main.js"] --> game_js["game.js"]
fparms_js["fparms.js"] --> glbchars_js["glbchars.js"]
game_js["game.js"] --> glbchars_js["glbchars.js"]
loading3d_js["loading3d.js"] --> glbchars_js["glbchars.js"]
- main.js
- fparms.js
- loading3d.js
- game.js
- main.js
- fparms.js
(Local public/js import graph, which may lag behind the PR head.)
Fix or refute each finding in its thread. Evidence settles the review.
— A green check still needs evidence. 🤡
Exercite seis mutantes de negociação e quatro controles de ticket no gate existente. Fixe o nó da emissão à sessão e recuse replay de nonce na régua. Agent: Claude Code Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: Claude Code Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: Claude Code Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: Claude Code Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: Claude Code Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: codex Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
|
Staging advanced after the exact-head review, so I resolved the new merge conflict in Focused proof on the combined tree:
AI assistance is recorded in the merge commit |
Agent: codex Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
|
Integrated the current Focused verification:
Adversarial review of exact head Agent: codex |
Both findings are resolved on exact head de84762. The required pr-fast gate is green, and the focused snapshot negotiation suite applies partida-version and detects exactly N9, N10, N17, N18, and N21.
Agent: codex Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: codex Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: codex Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Preserve the HTTPS smoke fixture alongside the release-gate hardening merged into staging. Agent: codex Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
estraga-codigo
left a comment
There was a problem hiding this comment.
Palhaço Mal · code reviewer · 🤡
Change map
- harness (17):
client-snapshot-negotiation-check.mjs,client-ticket-fallback-check.mjs,mp-paridade-check.mjs,mp-proximo-check.mjs… - game (8):
emote-catalog.js,emotes.js,game.js,glbchars.js… - other (5):
package.json,eval-suites.test.mjs,netcodec-v8.test.mjs,netcodec-v9.test.mjs… - docs (4):
CHANGELOG.md,ARMAS-MATRIZ.md,EMOTES-BR.md,CLIENT-SNAPSHOT-NEGOTIATION.md - CI (1):
ci.yml
Note
Summary: The diff adds snapshot protocol v9, v9 remote-player state, WebTransport-to-WebSocket ticket renewal, codec and negotiation tests, and a new CI quality gate. The new eval:rede3p package script references two harness files that are absent from the supplied repository files.
2 major · 0 minor
Caution
Risk HIGH · score 5.8/10 ▓▓▓▓▓▓░░░░
2 major finding(s). Resolve before merging.
Unresolved review threads block merging under the branch policy. Fix the finding or refute it with evidence.
🔴 Major findings (2)
- eval:rede3p references missing harness files —
package.json:341(action: ci-portoes)
Theeval:rede3pscript runstools/eval/rede3p-mutants-check.mjsandtools/eval/rede3p-mutants-proof.mjs, but neither file is included in the supplied repository file list or diff. The new CI step invokeseval:rede3p, so the quality gate fails when Node cannot load the first missing module, blocking every merge through that workflow.
💡 Fix: Add both referenced harness files to the change, or updateeval:rede3pto invoke harness files that are actually present and provide the required nominal and mutation checks. Runnpm run eval:rede3plocally before enabling it in.github/workflows/ci.yml.Suggested mutation:
Remove eithertools/eval/rede3p-mutants-check.mjsortools/eval/rede3p-mutants-proof.mjs; the CI gate fails when resolving the corresponding module. - netcodec mutation harness references undeclared modules —
tools/eval/netcodec-mutants-check.mjs:5(action: leis-da-casa)
The new implementation usesfs,os, andpathbut does not import them. The first use offs.readFileSynctherefore raisesReferenceError: fs is not definedbefore the nominal test run, so the mutation gate cannot execute or validate any codec mutation. This blocks theeval:netcodecquality gate rather than measuring the intended behavior.
💡 Fix: Importfsfromnode:fs,osfromnode:os, andpathfromnode:pathbefore executing the harness.
--- a/tools/eval/netcodec-mutants-check.mjs
+++ b/tools/eval/netcodec-mutants-check.mjs
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
> Suggested mutation: `Remove the `node:fs`, `node:os`, and `node:path` imports while leaving the harness body unchanged; the script then fails at `fs.readFileSync`.`
### Cross-module impact
```mermaid
graph RL
main_js["main.js"] --> game_js["game.js"]
fparms_js["fparms.js"] --> glbchars_js["glbchars.js"]
game_js["game.js"] --> glbchars_js["glbchars.js"]
loading3d_js["loading3d.js"] --> glbchars_js["glbchars.js"]
- main.js multiplayer clients
(Local public/js import graph, which may lag behind the PR head.)
Fix or refute each finding in its thread. Evidence settles the review.
— A green check still needs evidence. 🤡
Both exact-head findings were refuted with repository and executable evidence: the files and imports are present, the focused gates pass, all threads are resolved, and CI is green.
|
Snapshot v9 is ready on |
Snapshot v9 adds remote crouch, reload progress, and authoritative emote ID and phase in three bytes per entity. The client still offers v8 fallback and now requires each
welcomeorpartidaversion to match the protocol selected by that transport.Behavior
Verification
client-snapshot-negotiation-check.mjs: 22/22 nominal cases.ws-selection-check.mjs: nominal statusGREEN; the rejected-selection mutant fails exactly N3 and N4 withsubprotocolo_nao_negociado.npm run eval:netcode: 235 assertions.npm run eval:rede3p: 22 clauses and 12/12 causal mutant sets.Release order
Backend PR corosolto/backend#212 is merged, but merge is not deployment. The production backend image must include that fix and be pinned to the final integrated client engine before this frontend is promoted. Validate protocol 9,
serverSha,clientSha, andSIM_HASHon the node first, then release the matching client.Assisted by AI under owner authorization. Commits are signed and carry an
Agent:trailer.