Skip to content

Commit 1d23970

Browse files
committed
test(cli,lint): re-judge the per-package parity fixture to the ruled view-container shape; changeset is minor
The #18778 parity fixture's two view containers carried their own name and label beside the object binding. Both keys are dead in the view ledger and now warn on the union run, which broke the fixture's "union raises nothing" premise (5 warnings where 1 per-package survivor was pinned, and failing 5 under --strict). The containers now bind by object alone, so the fixture again holds exactly one per-package survivor and each test keeps its intent. The #5010 comment in the liveness test now says a retired key shows the dead default hint, not its note. The changeset is minor, carries Clause-②: no, and names view containers with their own name/label as a shape that now warns. Claude-Session: https://claude.ai/code/session_01JAhu8u8QfBvRjVZDox7CP9 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6ed56d2 commit 1d23970

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
2-
'@objectstack/lint': patch
2+
'@objectstack/lint': minor
33
---
44

55
Authoring a key whose liveness-ledger verdict is `dead` now draws a `liveness-dead-property` warning, and a `live-elsewhere` key a `liveness-live-elsewhere-property` warning, with no per-row `authorWarn` opt-in: the verdict itself is the warning. Before this, both rule ids were exported and never produced, because no shipped `dead` or `live-elsewhere` row opted in.
66

7+
Clause-②: no
8+
79
**Which keys warn.** A ledger row warns when its status is `dead`, `live-elsewhere` or `experimental`, or when it sets `authorWarn: true` (still the only way a `planned` row warns). Among authorable keys in the metadata types the rule walks, four are `dead` today: a view container's own `name` and `label` (the `defineView` container, not `list.label`), and a permission set's `rowLevelSecurity[].label` and `rowLevelSecurity[].description`. No walk visits `manifest`, `connectors` or realtime subscriptions, so their rows still warn nobody. That includes `manifest.runtime`, the one `live-elsewhere` row.
810

911
**The hint.** A row that warns only because of its `dead` or `live-elsewhere` verdict shows its `authorHint`, else the verdict's default hint: "Remove it — it is declared in the spec but not consumed at runtime." for `dead`. It never shows the ledger's internal `note`. Rows that opt in with `authorWarn`, and `experimental` rows, show exactly the hint they showed before.
1012

1113
**Retired keys.** A `retiredKey` tombstone keeps its `dead` row. Every command that parses (`os validate`, `os build`, the runtime publish gate) still refuses the key first, so it gets no second report. `os lint` does not parse: a config it accepts without `defineStack` that carries a retired key now gets a `liveness-dead-property` warning where it got nothing.
1214

13-
**What changes for a project.** Nothing is refused, and nothing changes without `--strict`. `os lint --strict` and `os validate --strict` now exit 1 instead of 0 on a stack that was otherwise warning-clean and authors a view container `label` or `name`, or a row-level-security policy `label` or `description`. Across this repository's example apps, only `app-showcase` gains warnings: two, on one permission set's policy `label` and `description`, and no example's exit code changes. To clear the warning, delete the key: nothing reads it.
15+
**What changes for a project.** Nothing is refused, and nothing changes without `--strict`. `os lint --strict` and `os validate --strict` now exit 1 instead of 0 on a stack that was otherwise warning-clean and authors a view container `label` or `name`, or a row-level-security policy `label` or `description`. A view container that carries its own `name` and `label` beside its `object` binding is one such shape: it draws two warnings per container, and under `--strict` that flips the exit. Across this repository's example apps, only `app-showcase` gains warnings: two, on one permission set's policy `label` and `description`, and no example's exit code changes. To clear the warning, delete the key: nothing reads it.

‎packages/cli/test/lint-per-package-authoring-parity.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,18 @@ const ordersObjects = [{
151151
account: { name: 'account', type: 'lookup', label: 'Account', reference: 'pp_account' },
152152
},
153153
}];
154+
// The containers bind by \`object\` and carry no \`name\` / \`label\` of their own:
155+
// both keys are \`dead\` in the view ledger, and since #16094 each draws a
156+
// union-run \`liveness-dead-property\` warning, which would break the "union
157+
// raises NOTHING" premise this fixture exists to hold. The list's own \`label\`
158+
// is live and stays.
154159
const ordersViews = [
155160
{
156-
name: 'pp_account', label: 'Account List', object: 'pp_account',
161+
object: 'pp_account',
157162
list: { label: 'Account List', columns: ['name', 'industry'] },
158163
},
159164
{
160-
name: 'pp_order', label: 'Order List', object: 'pp_order',
165+
object: 'pp_order',
161166
list: { label: 'Order List', columns: ['name', 'account'] },
162167
},
163168
];

‎packages/lint/src/lint-liveness-properties.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,10 @@ describe('lintLivenessProperties', () => {
525525
// Until #16094 these pins asserted SILENCE, because a `dead` row warned only
526526
// when it opted in. Decision batch #60, option A, made the `dead` verdict
527527
// itself the warning, so the rule — handed an unparsed stack, as `os lint`
528-
// hands it — grades a retired key dead (the row's note, which records the
529-
// removal, is the hint). Pinned per key, so a row that leaves the ledger or
530-
// changes verdict shows up by name.
528+
// hands it — grades a retired key dead. The row warns only by its verdict,
529+
// so the hint is the `dead` default, never the row's note (the #16094
530+
// author-facing block at the bottom of this file). Pinned per key, so a row
531+
// that leaves the ledger or changes verdict shows up by name.
531532
it.each(['actionUrl', 'actionType', 'actionIcon', 'aria'])(
532533
'grades the retired `%s` dead when handed an unparsed stack (#5010, #16094)',
533534
(key) => {

0 commit comments

Comments
 (0)