@pikku/skills 0.12.18 → 0.12.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,104 @@
1
1
  # @pikku/skills
2
2
 
3
+ ## 0.12.20
4
+
5
+ ### Patch Changes
6
+
7
+ - 7a15c9c: An actor credential is one persona's, not everyone's
8
+
9
+ `SCENARIO_ACTOR_SECRET` was a skeleton key. Anyone holding it could post any
10
+ `actor: true` address to `/auth/sign-in/actor` and get that persona's session —
11
+ including the `admin` persona, which provisioning grants real admin. The browser
12
+ switcher held it too, baked into the dev bundle as `VITE_SCENARIO_ACTOR_SECRET`,
13
+ so "the reviewer can sign in as each kind of user" and "the reviewer's bundle is
14
+ entitled to every persona" were the same fact.
15
+
16
+ It is now a root that credentials derive from, never one that is presented:
17
+
18
+ ```ts
19
+ deriveActorSecret(root, email) // HKDF-expanded HMAC-SHA256 over the address
20
+ ```
21
+
22
+ The endpoint re-derives the expected value for whichever address is signing in
23
+ and compares, so nothing is stored or looked up, a credential minted for one
24
+ persona is refused for every other, and rotating the root invalidates all of
25
+ them at once. The root itself is no longer a valid credential, and a root under
26
+ 32 characters refuses the endpoint rather than deriving weak credentials from
27
+ it — the server log says why, the client is not told.
28
+
29
+ What that buys, in the places that used to need the whole key:
30
+
31
+ - **`pikku dev`** mints one credential per declared persona into
32
+ `VITE_DEV_ACTOR_SECRETS` and no longer writes `VITE_SCENARIO_ACTOR_SECRET` at
33
+ all. The root stays on the server.
34
+ - **`pikku persona secret <id>`** mints them for anything else, and a run given
35
+ `PIKKU_PERSONA_SECRETS=id=secret,…` can sign in as those personas and no
36
+ others — asking for one outside the list throws naming the persona instead of
37
+ falling back to the root.
38
+
39
+ `useDevActors()` and `<DevActorSwitcher />` take `secrets` (one per address)
40
+ where they took `secret`, and an actor with no credential is no longer offered
41
+ rather than rendering a row that 401s. `HttpPersonasConfig.secret` and the
42
+ Playwright provider's `secret` additionally accept a resolver, which is how a
43
+ partially-credentialled run is expressed.
44
+
45
+ - ee9da9e: pikku-react now covers linking from a Mantine element: `component={Link}` widens the router generic to `AnyRouter` and stops checking `to` and `params`, so the skill teaches a wrapped typed `Link` reached through `renderRoot` instead.
46
+ - 7d641f3: The three build skills now draw the line between the manual click-through (a smoke check, for layout) and verification: anything worth driving through the UI belongs in a scenario's browser step, not in a browser session steered by hand that nothing re-runs.
47
+ - ee9da9e: The hardcoded-copy check stops flagging a feature's own name
48
+
49
+ Two rules disagreed. `runScenarioFileChecks` requires every `pikkuFeature` to
50
+ live in a `*.scenario.ts`, and moving one there is what put it in front of the
51
+ hardcoded-copy check — which then flagged the feature's own `name` because the
52
+ app catalogue happens to hold the same word:
53
+
54
+ ```
55
+ name: 'Downloads', → ✗ "Downloads" → nav__downloads | downloads__title
56
+ ```
57
+
58
+ Complying with the first rule created violations of the second, and the advice
59
+ — read the string from the app catalogue — would tie the Console's language to
60
+ the product's. `name`, `description` and `template` declared directly on a
61
+ `pikkuFeature`, `pikkuScenario` or `pikkuScenarioStep` are Console meta and are
62
+ now skipped. A `name` nested deeper — `getByRole('button', { name: 'Speichern'
63
+ })` — is a selector built out of UI copy and is still caught.
64
+
65
+ ## 0.12.19
66
+
67
+ ### Patch Changes
68
+
69
+ - f1ccfe3: A step ladder reads as one paragraph, not a list of restatements
70
+
71
+ Every step prefixed its actor with `the `, named that actor again, and repeated
72
+ the phase keyword. A three-step run by one person said their name three times
73
+ and `Given` three times, only read as English when the persona key happened to
74
+ be a role noun, and never said who that person was — the fabric template's own
75
+ placeholder came out as `the nadia opens /app`.
76
+
77
+ ```
78
+ Given yasser (the founder) signs in
79
+ When yasser opens the dashboard
80
+ And sees the audit log
81
+ And nadia reviews the invite
82
+ ```
83
+
84
+ The article is gone: the actor key is the subject verbatim, so a persona named
85
+ after a person reads as that person. A repeated phase reads as `And`, the way
86
+ Gherkin has always written it. A step that continues both the phase and the
87
+ actor drops the repeated subject, because English drops a repeated subject in a
88
+ compound predicate — it takes both, since eliding across a phase change gives
89
+ `When opens the dashboard`, and a pronoun rather than a name would give `they
90
+ sees`, step templates being authored in the third person singular.
91
+
92
+ An actor is introduced once, by the persona's `jobTitle` — prose someone wrote
93
+ for a reader. `roles` is authorisation, so a persona whose only description is a
94
+ `reviewer` grant gets no introduction rather than one assembled out of grants.
95
+ A row carries `sentenceWithRole` alongside `sentence`, set only where an actor
96
+ is first named, so a renderer can offer the introduction as a toggle without
97
+ parsing a composed sentence back apart.
98
+
99
+ `{placeholder}` filling, the `#ordinal` lookup for repeated step names and an
100
+ actorless step reading as its description alone are all unchanged.
101
+
3
102
  ## 0.12.18
4
103
 
5
104
  ### Patch Changes