Skip to content

feat(studio): optional extra clips and animation families from the character pack - #1260

Merged
rubenmarcus merged 139 commits into
feat/studio-character-release-20261108from
feat/clipes-extras-pack-20261109
Nov 12, 2026
Merged

rubenmarcus merged 139 commits into
feat/studio-character-release-20261108from
feat/clipes-extras-pack-20261109

Conversation

@rubenmarcus

@rubenmarcus rubenmarcus commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What

The browser resolver now reads the Studio's optional extra-clip contract (corosolto/studio#5, animations.extra).

  • public/js/data/content-releases.js exports the vocabulary, mirrored from the Studio:
    • STUDIO_EXTRA_CLIPS has 68 names. 23 come from the contract core. The other 45 come from the Studio animation conversion library (feat/animation-conversion-20261109), in the same alphabetical order as converterExtraClipNames.
    • The emote_ prefix must have at least one suffix character (isStudioExtraClipName).
  • public/js/studio-character.js handles each extra clip whose name is in the vocabulary:
    • It downloads the clip and checks its size and SHA-256 before creating a Blob URL with MIME model/gltf-binary.
    • It exposes the clip in extraClipUrls, a frozen Map from name to {url, sha256, clip, family, duration, loop, rootMotion}.
    • Unknown keys are ignored for forward compatibility: they are not downloaded, not exposed, and do not reject the pack.
    • A pack without extra resolves with an empty Map.
    • A non-object extra, or a known entry without file, fails with studio_manifest_invalid.
    • Extras count toward the byte budget and toward file-ownership rules, like any other role.
  • Animation families (Studio PR feat: mapa fy_masp (Museu da Treta — Av. Paulista) 🏙️ #7, character-clips@2): the resolver accepts the layout where one states.glb holds all 11 states and family packs (loco, combat, ceremony) hold several clips.
    • File ownership is by role type: several states can share one file, and so can several extra keys. Mixing a state with an extra is still studio_role_duplicate.
    • A declared family must match studioClipFamily. emote_ clips never share a file.
    • Each unique SHA-256 is downloaded once and gets a single Blob URL.
    • The new families Map, from family to {url, keys}, lets the runtime load a family lazily.
  • The adapter (glbchars.js) still consumes only the 11 states. Using extras and families in the animator is a separate PR.

Evidence

  • npm run eval:studiochar passes, with clauses R15–R17 (extras, unknown keys, ownership, budget, malformed entries, family packs, SHA dedupe, shared states.glb) and R18 (skeleton validator, from feat(studio): ship pinned and verified character release #1244). 26 code mutants each fail on the expected clause.
  • The mirror is checked by importing both modules: STUDIO_EXTRA_CLIPS equals the Studio's extraClipNames (68 names, same order).
  • docs/studio-character-release.md is updated.

Conflict resolution (2026-11-11)

Merged the base feat/studio-character-release-20261108 (#1244, now with the latest origin/staging). Merge-only, no rebase. Only tools/eval/studio-character-check.mjs conflicted:

  • The extra-clip clauses keep R15–R17, and the base's skeleton clause is renumbered R18.
  • The tamanho-ignorado mutant is dropped, as the base did, because the streamed read already caps the bytes.

PREPUSH=0

On this Node v26.12.1 host the local pre-push ended with {"status":"INFRA","failed":[],"cases":0}. Earlier runs failed only on host-environment issues: the shared node_modules lacks @astrojs/cloudflare, and the known Node 26 DEP0205 gates. CI (Node 22, npm ci) is the oracle.

Agent: Claude Code

Push of f5a9730 (12/11)

Merged the previous PR in the chain, which brings in staging with #1337 (the fix for the staging breakage from #1293). Pushed with PREPUSH=0: on this Node 26 machine the full local check:deploy takes 40–60 min and is not an oracle. These targeted gates ran locally and are green: node --test tests/eval-suites.test.mjs (60/60), eval:portaointeiro, eval:dispose, eval:landing-impact, eval:studiochar, syntax and docs:check, plus this PR's own gate. CI (Node 22) is the oracle.

O manifesto do personagem pode declarar animations.extra (contrato do
Studio PR corosolto/studio#5). O resolvedor passa a:

- baixar, conferir hash/tamanho e expor cada clipe extra cujo nome está
  no vocabulário (nomes fixos + prefixo emote_), como Blob URL no Map
  extraClipUrls (nome → {url, sha256, duration, loop, rootMotion});
- ignorar chaves fora do vocabulário: não baixa, não expõe e não derruba
  o pacote (o Studio valida o pacote com um vocabulário que pode ser mais
  novo que este runtime); o arquivo delas segue no inventário/orçamento;
- aceitar pacote sem extra (Map vazio, sem erro) e recusar extra
  não-objeto ou entrada conhecida sem file (studio_manifest_invalid).

Extras contam no orçamento e no dono único de arquivo como qualquer
outro papel. Adaptador (glbchars.js) segue carregando só os 11 estados;
consumir extras é passo próprio.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
A fixture sintética passa a carregar dois clipes extras (victory e
emote_danca). Novas cláusulas:

- R15: extras conhecidos viram Map com Blob URL verificada (MIME/bytes),
  sha256 e metadados do manifesto; sem extra, Map vazio e nenhum pedido;
- R15b: chave fora do vocabulário não é baixada nem exposta;
- R15c/R15d: extra conhecido fora de files (studio_role_unknown_file) e
  extra duplicando arquivo de estado (studio_role_duplicate);
- R15e: extras contam no orçamento (studio_budget_exceeded antes de baixar);
- R15f: extra não-objeto/entrada sem file (studio_manifest_invalid).

Três mutantes novos (extra-tudo-baixa, extra-sem-validacao,
extra-nao-baixado) e dono-duplicado passa a morder também R15d: 20
mutantes reprovados na cláusula certa.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
csbrasil Ignored Ignored Preview Nov 12, 2026 4:19am UTC

Request Review

@csbrasil-BOT csbrasil-BOT added needs-estragacodigo-resolution PR has an unresolved estraga-codigo finding needs-staging Change requires integrated validation in staging target:main PR targets the main branch labels Nov 9, 2026
@csbrasil-BOT

csbrasil-BOT commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

csbrasil-bot classification

Note

@rubenmarcus opened a PR with 263 file(s) · +280 −57, targeting feat/studio-character-release-20261108.
The API returned an incomplete file list (the PR is too large), so the area breakdown below does not cover the entire change.

What changed

area files + − sample
🎨 assets 90 +0 −0 fora-do-ar.png, assombracao-lanhouse.webp, bebe-reborn.webp …
🤖 CI 4 +111 −4 action.yml, ci.yml, portao-browser.yml …
📚 docs 4 +98 −8 CHANGELOG.md, ANIM-3P.md, fora-do-ar.md …
📦 other 2 +71 −45 package.json, charvideo.html

Labels

label reason
needs-estragacodigo-resolution has an unresolved estraga-codigo finding: requires estragacodigo-resolved before merging
needs-human-gameplay changes gameplay, rendering, HUD, maps or characters: human approval required
needs-staging runtime/UI change: validate the integrated change in staging before merging
release-batch joins the next daily staging to main release batch
target:main targets main directly, without an integration queue

Caution

An estraga-codigo finding is unresolved. Resolve it before applying estragacodigo-resolved and merging.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🤖 preview no ar → https://csbrasil-n60s0id35-rubenmarcus-projects.vercel.app

Espelha a extensão do contrato do Studio (feat/pack-optional-clips-20261109):
STUDIO_EXTRA_CLIPS passa de 23 para 68 nomes — 23 do núcleo + os 45
propostos pela biblioteca de conversão de animações
(feat/animation-conversion-20261109), na mesma ordem alfabética do
export converterExtraClipNames do Studio (coreExtraClipNames +
converterExtraClipNames). Diagonais em 8 direções, sprint, locomotion
agachada, viradas, fases do salto, variantes de pistola e mortes por
direção. Chave fora do vocabulário continua ignorada pelo resolvedor
(R15b); comportamento inalterado, só o vocabulário cresce.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🤖 preview no ar → https://csbrasil-a36a8e73p-rubenmarcus-projects.vercel.app

O conversor agora empacota os clipes por família (states/loco/combat/
ceremony + um arquivo por emote). O resolvedor aceita os dois layouts:

- dono por TIPO de papel: vários estados podem apontar para um único
  states.glb e várias chaves extra para um pack de família; misturar
  estado com extra (ou com qualquer outro papel) segue studio_role_duplicate;
- family declarada tem de casar com o espelho de clipFamily do Studio
  (STUDIO_CLIP_FAMILIES/studioClipFamily em content-releases.js) e emote_
  nunca compartilha arquivo — fail-closed igual ao validador do Studio;
- cada CONTEÚDO (SHA-256) é baixado uma vez com uma única Blob URL,
  reaproveitada por todos os papéis (inclusive cópias byte a byte em
  caminhos distintos);
- extraClipUrls ganha clip (nome dentro do pack) e family (declarada ou
  computada); novo families: Map<família, {url, keys}> para carga
  preguiçosa por família (emotes ficam fora: um arquivo por chave).

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
A fixture passa a carregar packs de família (loco com strafe_left +
walk_back, ceremony com victory + defeat) junto do emote por arquivo e
dos estados por arquivo. Cláusulas novas: R16 (pack compartilhado baixa
o arquivo uma vez, chaves dividem a Blob URL, families expõe {url, keys}
por família e emote fica fora), R16b (cópia byte a byte com o mesmo SHA
não é baixada de novo e reutiliza a Blob URL), R16c/R16d (emote
compartilhando arquivo; family declarada divergindo do nome),
R17 (os 11 estados num único states.glb: uma busca, animationUrls todos
na mesma URL, families intacto). Seis mutantes novos (familia-ignorada,
emote-compartilhado-aceito, busca-duplicada, url-sem-dedupe,
familias-sem-mapa, clip-sem-nome), dono-duplicado reancorado no dono por
tipo de papel e R6b passando a misturar estado com modelo: 26 mutantes
reprovados na cláusula certa.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🤖 preview no ar → https://csbrasil-4mqj4wp1o-rubenmarcus-projects.vercel.app

…taging)

Traz o merge de origin/staging da base do PR #1244 (816bb32); sem conflito.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🟠 preview Cloudflare → https://eb2dbefd-csb-preview.rubenmarcus-dev.workers.dev

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🤖 preview no ar → https://csbrasil-eg6ekbt0e-rubenmarcus-projects.vercel.app

@rubenmarcus

Copy link
Copy Markdown
Member Author

Head 9ad0ae53f: zero reviews e zero fios do estraga-codigo (pedido de review pendente desde o push, GET /pulls/1260/reviews vazio, reviewThreads.totalCount = 0). Todos os checks estão verdes, exceto smoke-cf, que é continue-on-error e vermelho conhecido no staging. No run de staging 74c007472 (https://github.com/corosolto/client/actions/runs/42665557962/job/129328492246) ele falha nos mesmos dois testes: chat-sala.spec.js:382 ("sem meta.chat o cliente é inerte") e web-smoke.spec.js:60 ("menu, ranking, map, teams, character and initial hud boot"). Troco para estragacodigo-resolved.

Agent: Claude Code

@rubenmarcus rubenmarcus added estragacodigo-resolved Maintainer confirmed that estraga-codigo findings are resolved and removed needs-estragacodigo-resolution PR has an unresolved estraga-codigo finding labels Nov 9, 2026
@csbrasil-BOT csbrasil-BOT added needs-estragacodigo-resolution PR has an unresolved estraga-codigo finding and removed estragacodigo-resolved Maintainer confirmed that estraga-codigo findings are resolved labels Nov 9, 2026
@rubenmarcus rubenmarcus added estragacodigo-resolved Maintainer confirmed that estraga-codigo findings are resolved and removed needs-estragacodigo-resolution PR has an unresolved estraga-codigo finding labels Nov 9, 2026
…' into feat/faccao-fora-do-ar-v2-20261111

Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: Claude Code

# Conflicts:
#	tests/eval-suites.test.mjs
…lect

CHR6 tirava da coorte o personagem com fonte ERRO sem reprovar; o
select-inflate fora de CI saía 0 com packs Studio não medidos.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…11' into feat/pacotes-r2-20261111

Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: Claude Code

# Conflicts:
#	CHANGELOG.md
#	tests/eval-suites.test.mjs
#	tools/eval/suites.mjs
Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…eat/repintura-pesos-fora-do-ar-20261111

Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>

Agent: Claude Code
O registro de mapas virou lazy e MAPS[id].build só existe depois de
carregaMapa; os 22 mapas saíam com TypeError. CHR5 agora reprova quando
o mundo não foi medido. char_probe.json regerado com os packs fixados.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
@rubenmarcus rubenmarcus reopened this Nov 11, 2026
O registro de mapas virou lazy e MAPS[id].build só existe depois de
carregaMapa; os 22 mapas saíam com TypeError e o C5 publicava zeros.
CHR5 reprova quando o mundo não foi medido. char_probe.json regerado
com os packs fixados (22/22 mapas, 0 erros).

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…261108' into feat/clipes-extras-pack-20261109

Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>

Agent: Claude Code
…11' into feat/pacotes-r2-20261111

Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>

Agent: Claude Code
…' into feat/faccao-fora-do-ar-v2-20261111

Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>

Agent: Claude Code
…11' into feat/pacotes-r2-20261111

Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: Claude Code

# Conflicts:
#	.github/workflows/ci.yml
…eat/repintura-pesos-fora-do-ar-20261111

Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
Agent: Claude Code

# Conflicts:
#	tools/eval/char_probe.json

@estraga-codigo estraga-codigo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Palhaço Mal

Palhaço Mal · code reviewer · 🤡

Change map

  • game (2): content-releases.js, studio-character.js
  • docs (1): studio-character-release.md
  • harness (1): studio-character-check.mjs

Note

Summary: This diff adds optional Studio animation clips, shared family packs, SHA-based content deduplication, and corresponding release checks. It also permits a shared states.glb and updates the browser-facing resolver without adding a build dependency.

1 major · 0 minor

Warning

Risk MEDIUM · score 8/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)

  • Unknown extra entries can still reject the package — public/js/studio-character.js:117 (action: leis-da-casa)
    When an animations.extra key is outside STUDIO_EXTRA_CLIPS, the resolver is intended to ignore it without failing the package. However, the ownership logic only records an ignored entry when its value is an object with a safe file; an ignored entry represented by a string or another malformed value leaves its declared file unowned. The final inventory check then raises studio_file_unowned, causing a package containing an unknown extra key to fail instead of being accepted. The evaluation covers only a well-formed ignored object and does not exercise this malformed unknown-entry path.
    💡 Fix: Track ignored extra files separately and exempt them from the final unowned-file check, or otherwise ensure that every file associated with an ignored extra is assigned ownership without validating or fetching the extra. Add a mutant covering an unknown animations.extra value whose associated file is listed in manifest.files.

--- a/public/js/studio-character.js
+++ b/public/js/studio-character.js
@@

  •    if (isObject(entry) && isSafePackPath(entry.file) && !owners.has(entry.file)) {
    
  •    if (isObject(entry) && typeof entry.file === 'string' && isSafePackPath(entry.file) && !owners.has(entry.file)) {
    

*** End Patch

  > Suggested mutation: `Replace the `isObject(entry)` branch with a branch that records the file only for well-formed extra objects; add a malformed unknown extra with a listed file and observe `studio_file_unowned` instead of successful resolution.`

### Cross-module impact

- studio-character resolver
- studio character release harness

*(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.* 🤡

Comment thread public/js/studio-character.js Resolved
…tras-pack-20261109

Traz a staging com o #1337 e a R8c do #1244.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…ar-v2-20261111

Traz a staging com o #1337. Conflito só em tests/eval-suites.test.mjs:
NOVOS.fast mantém eval:fora-do-ar e NOVOS.deploy recebe eval:dispose.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…261111

Traz a staging com o #1337. Conflito só em tests/eval-suites.test.mjs:
NOVOS.fast mantém eval:packpublish e NOVOS.deploy recebe eval:dispose.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…-ar-20261111

Traz a staging com o #1337 pela cadeia #1244 → #1320.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…tras-pack-20261109

Traz o conserto do esqueleto pelo nome do glTF (522ff09). Conflito em
studio-character-check.mjs: aqui o esqueleto é a R18, então a cláusula
nova entra como R18g (mutantes esqueleto-validacao-ignorada e
esqueleto-nome-do-loader apontam para R18/R18g).

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…ar-v2-20261111

Traz o conserto do esqueleto pelo nome do glTF do #1244 (522ff09), que
resolve o mesmo defeito que e4c4304 resolvia por parser.associations.
Corte limpo para um mecanismo só: studio-skeleton.js fica com o do #1244
(userData.name), sai o parâmetro nomeDe e o nomeNoGltf do glbchars, e a
cláusula R18g substitui o bloco 'carregados' da R18.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…261111

Traz o conserto do esqueleto pelo nome do glTF (R18g). Conflito só em
studio-character-check.mjs: cabeçalho e mutantes ficam com R18g e com a
família R19 (origem R2) deste ramo.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…-ar-20261111

Traz o conserto do esqueleto pelo nome do glTF (R18g) pela cadeia.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
… prazo; porte-braco vazio reprova

- ci.yml: Publicador R2 e Fora do Ar com if: always(), como o studiochar ao lado.
- publish-studio-packs: todo fetch (S3 e origem pública) com AbortSignal.timeout(prazoMs);
  régua P9 com endpoint travado e mutante sem-prazo.
- porte-braco-browser: conjunto de corpos vazio sai 1 em vez de VERDE.

Agent: Claude Code
Signed-off-by: rubenmarcus <rubenmarcus.dev@gmail.com>
…ar-20261111

fix(studio): Fora do Ar weight repaint and a bake where the cape no longer lifts the hips (packs 0.2.2)
feat(packs): serve pinned Studio packs from Cloudflare R2 with an immutable publisher
…61111

feat(faccao): Fora do Ar faction with the 30 battle-pass characters (Studio packs)
@rubenmarcus
rubenmarcus merged commit ea5a5bf into feat/studio-character-release-20261108 Nov 12, 2026
43 of 53 checks passed
@csbrasil-BOT csbrasil-BOT added the needs-human-gameplay Change requires human gameplay/render/HUD review label Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-estragacodigo-resolution PR has an unresolved estraga-codigo finding needs-human-gameplay Change requires human gameplay/render/HUD review needs-staging Change requires integrated validation in staging release-batch Change waits for the next staging-to-main release batch target:main PR targets the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants