Repository navigation
Upgrade to @objectstack 7.7.0 + fix metadata-spec violations - #15
Merged
Merged
Conversation
…violations
Bump @objectstack/* ^7.4.1 → ^7.7.0 across all packages. 7.7's stricter
build (ADR-0032 + unknown-key rejection) surfaced several places where the
templates were authored against shapes/APIs that don't exist and silently
no-op'd at runtime. Fixed all of them; 9/9 packages build green + typecheck
clean, verified end-to-end in the browser.
- hr: move "employee cannot be their own manager" guard from a CEL rule
(referenced the implicit `id`) into hr_employee.hook.ts.
- workflows → hooks: object-level `workflows: [...]` is not an ObjectSchema
field (silently stripped). Migrated all 15 on-update stamping/status rules
across 8 objects to beforeInsert/beforeUpdate hooks; date logic in JS.
- stateMachines → validations: object-level `stateMachines: {...}` is not an
ObjectSchema field (silently stripped → 14 lifecycle machines never
enforced). Migrated to `type: 'state_machine'` validation rules; now
enforced at runtime.
- remove dead rollup hooks: procurement_receipt / content metric+publication /
compliance_assessment rolled up via `ctx.services.data`, undefined in the
hook sandbox (nested writes crash QuickJS — see expense/CHARTER.md). Targets
documented as stored header fields.
- fix dangling user lookups: Field.lookup('user') → Field.lookup('sys_user')
(27 fields + view refs). 'user' is not a registered object; resolving it
flooded `no such table: user` at runtime.
Co-Authored-By: Claude Opus 4.8 <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.
Closes the 7.6 upgrade (issue #14) and carries it forward to 7.7.0. 7.7's stricter build (ADR-0032 expression validation + rejection of unknown
ObjectSchemakeys) surfaced several places where the templates were authored against shapes/APIs that don't exist and silently no-op'd at runtime. All fixed here.Changes
@objectstack/* ^7.4.1 → ^7.7.0across all packages (+ lockfile).id) intohr_employee.hook.ts.workflows→ hooks: object-levelworkflows: [...]is not anObjectSchemafield (silently stripped → never ran). Migrated all 15 on-update stamping/status rules across 8 objects tobeforeInsert/beforeUpdatehooks; date logic done in JS (also sidesteps the CEL date↔timestamp gap).stateMachines→ validations: object-levelstateMachines: {...}is likewise not a field (silently dropped → 14 lifecycle machines never enforced). Migrated totype: 'state_machine'validation rules; now enforced at runtime.procurement_receipt/contentmetric+publication /compliance_assessmentrolled up viactx.services.data, which is undefined in the hook sandbox (a nested engine write would crash QuickJS — seepackages/expense/CHARTER.md). Targets documented as stored header fields.Field.lookup('user')→Field.lookup('sys_user')(27 fields + view refs).'user'is not a registered object; resolving it floodedno such table: userat runtime.Verification
tsc --noEmitclean.allaggregate: hooks fire, state machines enforce illegal transitions, lookups resolve,no such table: usergone.Known platform bugs (NOT addressed here — server-side)
null(CEL date↔timestamp).🤖 Generated with Claude Code