Repository navigation
feat: collections stage 3 contract and core (RFC-0042 step 1) - #103
Merged
Merged
Conversation
…042 step 1) - Contract: CollectionSettings.listFields, expiry and structuredData (sources by kind: field, entry, site, text; EntryValueProperty and SiteValueProperty as named $defs), contentList where/orderBy (FieldCondition, FieldOrder); 4 valid and 44 invalid fixtures; TS and Rust regenerated. - @cloudhal/core-ts/structured-data: the closed table for Event, JobPosting, Product and Recipe, checkStructuredData, structuredDataFor (required values, vocabularies, ISO 4217, 32 KB). - @cloudhal/core-ts/fields: the shared query evaluator (query.ts) and fieldGateInstant / expiryInstant (gate.ts, Intl only), with an oracle test against Temporal across 17 zones. - ADR-0044: the constant source kind is `text`, as in RFC-0042 §1. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
`text` named the value's type while `field`, `entry` and `site` name its origin, and `text` is already a field type (RFC-0041). `constant` matches the other kinds, the prior art (R2RML rr:constant, JSON Schema const) and leaves room for typed constants later. Decided by Halil before release; RFC-0042 §1 and ADR-0044 updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
This was referenced Oct 23, 2026
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.
Step 1 of RFC-0042's rollout (ADR-0044). No behaviour change: nothing reads the new code yet.
Contract
CollectionSettings.listFields(≤ 4 keys),expiry({field, action: unlist|hide, afterMinutes?}) andstructuredData({type, properties}).kind:field,entry,siteortext.EntryValuePropertyandSiteValuePropertyare named$defs, because cargo-typify merges inline enums.ContentListSectiongainswhere(1–4FieldConditions) andorderBy(FieldOrder).#[serde(tag = "kind")] enum StructuredDataSource.@cloudhal/core-ts/structured-data(new subpath)checkStructuredData: unknown paths and fields, source/type mismatches, vocabularies, ISO 4217 currencies, and required properties (no constants on them).structuredDataFor: no document when a required value is missing. The 32 KB cap drops optional properties first.@cloudhal/core-ts/fieldsquery.ts: the shared evaluator (parseFieldQuery,matchesFieldQuery,compareByField,checkFieldQuery→invalid_query).gate.ts:fieldGateInstantandexpiryInstant, computingmin(until, field date + grace). A date ends at the start of the next day in the site's zone, computed withIntlonly, never early.Intlinstead.ADR-0044 fix: the constant source kind is
text, as in RFC-0042 §1 (the ADR had saidconstant).Tests
EADDRNOTAVAIL.cargo testand clippy pass.Changeset: minor (
core-contracts,core-ts).🤖 Generated with Claude Code