Skip to content

Ai audit - batch 1#124

Open
nearnshaw wants to merge 10 commits into
mainfrom
ai-audit
Open

Ai audit - batch 1#124
nearnshaw wants to merge 10 commits into
mainfrom
ai-audit

Conversation

@nearnshaw

Copy link
Copy Markdown
Member

No description provided.

@decentraland-bot decentraland-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Documentation Audit Review — Batch 1

This is a massive and excellent documentation audit covering ~60 SDK7 markdown files. I verified the key changes against the actual source code in js-sdk-toolchain, ecs-math, protocol, transactions-server, and builder-client. The overwhelming majority of changes are correct and bring the docs in line with the actual SDK APIs.

Summary of changes

API name correctionsGLTFContainerGltfContainer, Quaternion.Zero()Quaternion.Identity(), Quaternion.toEuler()Quaternion.toEulerAngles(), Scalar.LerpScalar.lerp, etc. All verified correct against ecs-math and SDK source.

Property name fixeshideFeedbackshowFeedback, disabledisabled, placeHolderplaceholder, loopingloop, samplingModefilterMode, cameraModemode, directiontransitionMode, etc. All confirmed in SDK source.

Code example fixes — Missing imports added (engine, Transform, Color4, etc.), unclosed parentheses fixed, JSX comment syntax corrected (// comment{/* comment */}), template literal syntax fixed ($variable${variable}), color values normalized to 0-1 range, missing export keywords added. All syntactically correct.

Behavioral correctionstextWrap default changed to 'wrap' (confirmed in getTextWrap()), scaleFontSize default is 0.39 not "0.39vh" (confirmed), UI Scale Factor formula includes / devicePixelRatio (confirmed in system.ts), system priority semantics updated (higher = first), font strings now 'sans-serif'/'serif'/'monospace' (confirmed in Label/utils.ts).

Protocol/type corrections — Avatar colors are Color3 not Color4, field is eyesColor not eyeColor (confirmed in proto), normalHit is Vector3 not Quaternion, PointerEventType enum order corrected, InteractionType.PROXIMITY (not IT_PROXIMITY).

Networking fixessignedFetch response: response.body for content and response.ok for error check (confirmed), syncEntity from @dcl/sdk/network (confirmed correct import path), MessageBus correctly noted as deprecated (confirmed @deprecated tag in source), Schemas.Boolean (not Schemas.Bool).

Infrastructure referencestransactions-server: .env.defaults (not .env.example), src/ports/transaction/ (singular, not plural), COLLECTIONS_FETCH_INTERVAL_MS — all confirmed against repo.

New contentRealmInfo.onChange() example (confirmed component exists with .onChange() support on engine.RootEntity), screenInsetArea in UiCanvasInformation (confirmed), getCompositeProvider() / Composite.instance() API for composites.

Finding

[P1] Smart wearable file size limit changed from 3MB to 2MB — likely incorrect

File Lines
creator/sdk7/projects/smart-wearables.md Two instances

The PR changes the smart wearable size limit from 3MB to 2MB in two places. However, the authoritative limit is 3MB, defined in @dcl/builder-client at src/files/constants.ts:

export const MAX_SMART_WEARABLE_FILE_SIZE = 3 * 1024 * 1024 // 3MB

The builder frontend enforces this 3MB limit. The SDK CLI's pack-smart-wearable command does use 2MB (MAX_WEARABLE_SIZE = 2097152), but that appears to be an outdated value in the CLI, not the actual enforced limit. The official docs on uploading smart wearables also state 3MB. I'd recommend keeping the 3MB value here, or confirming with the team whether the CLI's 2MB value is intentional.

Minor observations (P2, non-blocking)

  1. Inconsistent import path fix: The PR correctly fixes @dcl/sdk/src/network@dcl/sdk/network in entity-positioning.md, but the analogous pattern @dcl/sdk/src/players remains in several files (user-data.md, scene-blockchain-operations.md, event-listeners.md). This may be intended for a future batch.

  2. Git style: The PR title "Ai audit - batch 1" doesn't follow the semantic commit format <type>: <summary> (e.g., docs: SDK7 documentation audit - batch 1). Non-blocking for a docs repo.

Verdict

Approved. This is a thorough, high-quality documentation audit. Nearly every change I verified against the source code is correct. The one P1 finding (smart wearable size limit) is a factual question worth confirming but not a merge blocker since the existing docs already say 3MB and the builder enforces 3MB. The overall improvement to documentation accuracy is substantial.


Reviewed by Jarvis 🤖 · Requested by Gabriel Díaz (<@U04RSKE0Z1Q>) via Slack


{% hint style="warning" %}
**📔 Note**: The output of `npm run pack` will indicate the size of the uncompressed exported project, it must be under 3MB. If larger than that, it won’t be accepted by the builder.
**📔 Note**: The output of `npm run pack` will indicate the size of the uncompressed exported project, it must be under 2MB. If larger than that, it won’t be accepted by the builder.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] The authoritative smart wearable size limit is 3MB, defined in @dcl/builder-client (MAX_SMART_WEARABLE_FILE_SIZE = 3 * 1024 * 1024). The builder frontend enforces this value.

The SDK CLI's pack-smart-wearable command uses 2MB (MAX_WEARABLE_SIZE = 2097152), but this appears to be an outdated value in the CLI, not the actual enforced limit.

I'd recommend either:

  • Keeping the original 3MB value (matches builder enforcement), or
  • Confirming with the team whether the CLI's 2MB threshold is intentional and the builder limit should be lowered to match.

@decentraland-bot

Copy link
Copy Markdown
Contributor

Update on P1 finding (smart wearable file size limit):

Per Gabriel's feedback — the authoritative source for this limit is ADR-246:

"The total size of any wearable, excluding Skins, shall not exceed 3MB, which includes all associated files like thumbnail and image with rarity background."

The PR changes the smart wearable size limit from 3MB to 2MB in two places in smart-wearables.md. This contradicts ADR-246, which is the specification the team aligns to. The builder frontend (MAX_SMART_WEARABLE_FILE_SIZE = 3 * 1024 * 1024) also enforces 3MB, consistent with the ADR.

Recommendation: Revert both instances back to 3MB to match ADR-246.

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.

2 participants