Repository navigation
feat(validate): warn that storage registry and hook are not available yet - #889
Merged
Merged
Conversation
… yet civitai.com refuses two more storage collection fields at submit until their features are switched on in APP_STORAGE_ENABLED_FEATURES (registryExport, hooks): `registry` and `hook`. The canonical schema admits both (re-vendored in #887), so a schema-clean manifest declaring either validated clean and was then refused at submit. Both are reported exactly like the other five feature gates: a WARNING built by storageNotYet, carrying the server's notYet text verbatim plus the CLI's "refuses this at submit today" suffix, located at the field. Ordering mirrors parseCollection: - registry: the switch is checked before the value and the shared-only rule, so any declared registry draws the gate. - hook: the switch is checked only after parseHook accepts the shape, so hookShapeAccepted mirrors the shape checks the schema states, and a malformed hook gets the schema's error and no gate. Known divergence: the server's file-inside-outputDir rule is not mirrored (documented). No hook behaviour: no hook file is read and no digest checked. Tests: a ledger row per field (gate warning, exact text, field, no error, and a twin without the field draws none), drift-guard rows for both RESERVED schema sentences, six gate-ordering rows for malformed hooks, and both fields in the finding-field ledger and contract corpus. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ring A 201-character hook file (one over APP_STORAGE_HOOK_FILE_MAX_LENGTH, and otherwise a valid path) gets the schema's maxLength error and no "not available yet" warning. Mutation-checked locally: raising the length bound in hookShapeAccepted turns exactly this row red. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ZacxDev
force-pushed
the
feat/validate-reserved-hook-registry
branch
from
November 10, 2026 18:53
f2474da to
4c74e4a
Compare
…hook length rule (reverted next) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Restores 4c74e4a's tree exactly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rted next) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Restores 4c74e4a's tree exactly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ZacxDev
marked this pull request as ready for review
November 10, 2026 19:04
…gates Test rows only, no code change: - a 200-character hook file is accepted and warned (the bound is inclusive) - a .mjs hook file is warned (the pattern ends \.m?js$) - timeoutMs 0 gets the schema error and no warning - a hook without sha256 gets the schema error and no warning - registry on a PRIVATE collection still gets the gate warning: the server checks !features.registryExport before the shared-only rule Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ry gates (reverted next) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Restores 8cbd3ab's tree exactly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Audit at
|
ZacxDev
added a commit
to civitai/civitai-developer-docs
that referenced
this pull request
Nov 10, 2026
…rts (#324) civitai/cli#889 (released in v0.1.137) makes `civitai app validate` warn that the RESERVED storage collection fields registry and hook are not available yet, as it already does for the five other server-refused features. The validate guide said the CLI rejects both as unknown properties, which is now true only for v0.1.136 and earlier. Add both rows with the fix text the CLI prints, note that a malformed hook gets the schema error instead, and keep the older-CLI caveat. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
civitai app validatenow reports the two reserved storage collection fields,registryandhook, as "not available yet". civitai.com refuses both at submit whileregistryExportandhooksare off in civitai main'sAPP_STORAGE_ENABLED_FEATURES.They use the same path as the five existing gates (
kind"log",write"anyone"/"owner",ttlSeconds,dailyWritesPerAuthor): a warning fromstorageFeatureGateWarnings, built bystorageNotYetfrom the server'snotYettext plus the CLI's "refuses this at submit today" suffix, and located at the field.What an author sees:
Order of checks (matches
parseCollection)registry: the server checks the feature switch before it checks the value or the shared-only rule, so any declaredregistrygets the gate.hook: the server checks the switch only afterparseHookaccepts the shape.hookShapeAcceptedcopies the shape checks the schema states (allowed keys, file pattern and length, nonode_modules, sha256 pattern,timeoutMs1 to 500). A malformed hook gets the schema's error and no gate.fileinsideoutputDiris not copied. A hook there gets the gate warning here, where the server namesoutputDir.There is no hook behaviour: no file is read and no digest is checked.
Tests
TestStorageFeaturesNotYetAvailableAreWarnings/{registry,hook}: each declared field gets exactly one gate warning with the exact text and field, and no error. A twin collection without the field gets nothing.TestVendoredSchemaStillStatesTheFeatureGates: rows for both RESERVED schema sentences, so the gate list matches the schema.TestStorageFeatureGateOrderMirrorsTheServer: six malformed-hook rows that get the schema error and never the gate.Dependency
This needs #887, the re-vendored schema that adds
registryandhook. Until #887 merges and this branch is rebased, the new rows fail on this branch because the vendored schema still rejects both fields as unknown properties.🤖 Generated with Claude Code