Skip to content

Commit bff24d6

Browse files
committed
test(lint,cli): re-take the pins the action form's two new rows move
The lint shipped-corpus pins move 83 to 85 predicates and 58 to 62 literal comparisons (outcomeMessages and onSuccess each carry a two-literal type gate). The cli outcome-messages equality now leaves out the metadataForms subtree, where the new form row's own strings match the substring. Claude-Session: https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ Co-authored-by: Claude <noreply@anthropic.com>
1 parent a5106c1 commit bff24d6

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

‎packages/cli/test/i18n-extract-outcome-messages.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ describe('i18n extraction — outcomeMessages (#21095)', () => {
7070
});
7171

7272
it('emits nothing for an outcome nobody declared, and nothing for an action without the map', () => {
73-
const outcomeKeys = paths().filter((k) => k.includes('.outcomeMessages.'));
73+
// The `metadataForms.` subtree is left out: the action form's own
74+
// `outcomeMessages` row puts its label / helpText / placeholder strings at
75+
// `metadataForms.action.fields.outcomeMessages.*`, which are form-row text,
76+
// not the copy of any declared outcome.
77+
const outcomeKeys = paths().filter((k) => k.includes('.outcomeMessages.') && !k.startsWith('metadataForms.'));
7478
expect(outcomeKeys.sort()).toEqual([
7579
'globalActions.check_app_updates.outcomeMessages.up_to_date',
7680
'objects.sys_environment._actions.archive_environment.outcomeMessages.already_archived',

‎packages/lint/src/validate-predicate-path-refs.test.ts‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,15 @@ describe('#7010 corpus — shipped METADATA_FORM_REGISTRY', () => {
630630
// shipped `*.form.ts` corpus differenced against the merge base
631631
// `d78a0bda07` adds exactly `field :: useGrouping :: data.type == 'number'`
632632
// and removes none.
633-
expect(predicates, 'the shipped metadata forms carry no predicates at all').toBe(83);
633+
// It is 85 today, an ADDITION of TWO: #21863 offered the action form's
634+
// `outcomeMessages` and `onSuccess` rows, each gated on the two action types
635+
// whose parse accepts the key. Measured, not inferred: the shipped
636+
// `*.form.ts` corpus differenced against the merge base `607463d736` by
637+
// `<form>::<field>::<source>`, 83 → 85, adds exactly
638+
// `action :: outcomeMessages` and `action :: onSuccess`, both
639+
// `data.type == 'api' || data.type == 'script'`, and removes none. The two
640+
// `onSuccess` sub-rows carry no predicate.
641+
expect(predicates, 'the shipped metadata forms carry no predicates at all').toBe(85);
634642

635643
const findings = validatePredicatePathRefs(corrupted);
636644
expect(findings).toHaveLength(predicates);
@@ -731,7 +739,10 @@ describe('#7010 corpus — shipped METADATA_FORM_REGISTRY', () => {
731739
// literal.
732740
// It is 58 today: the field form's `useGrouping` row is gated on
733741
// `data.type == 'number'`, a single-quoted literal comparison.
734-
expect(comparisons, 'no shipped predicate carries an `==`/`!=` literal comparison').toBe(58);
742+
// It is 62 today: #21863's two new predicates each hold two single-quoted
743+
// literal comparisons, `data.type == 'api'` and `data.type == 'script'`,
744+
// on `action :: outcomeMessages` and on `action :: onSuccess`.
745+
expect(comparisons, 'no shipped predicate carries an `==`/`!=` literal comparison').toBe(62);
735746

736747
const rhsFindings = validatePredicatePathRefs(corrupted)
737748
.filter((f) => f.rule === PREDICATE_RHS_PATH_SHAPED);

0 commit comments

Comments
 (0)