With the WebGL renderer, applying a typography changed the text but left
its box at the old size, because nothing asked the renderer to measure
the text again. apply-typography now waits for the new font and resizes
the auto-grow texts inside its undo step, as the Design tab does.
The typography bar at the bottom of the canvas had its own copy of this
logic, with no resize and no undo step: the font-load heal resized the
box later without recording undo, so Ctrl+Z left the new size. It now
calls apply-typography.
Closes#13124
AI-assisted-by: claude-opus-5-5
* 🐛 Submit the import audit events from the import job
Since 2.20 the dashboard imports .penpot files through the
:import-binfile job, which submitted no audit event. The outcome of
an import and the files it created were lost, so analytics could no
longer tell completed imports from failed ones.
The job now submits the import-binfile event with the name and props
of the legacy RPC event (status, file-ids, file-count, project,
version, generated-by, referer), plus the job id, the team id, the
package size and the elapsed time. A cancelled job reports the
cancelled status. A completed import also submits a create-file event
per imported file, as the legacy RPC does. As in the RPC, an import
refused by the permission check submits no event.
Closes#13148
AI-assisted-by: claude-opus-5-5
* 🐛 Audit import jobs at their terminal transition
Run optional terminal hooks in the winning job transaction and use one
for import audit events. Preserve the separate import transaction and
cover cancellation, rollback, RPC paths, and dispatcher aborts.
AI-assisted-by: gpt-6.1-terra
* ♻️ Simplify the terminal job hook contract
Pass a semantic terminal job to the hook with its final status and
decoded parameters, result or error. Adapt the import audit and tests.
AI-assisted-by: gpt-6.1-terra
* 🐛 Keep import jobs bound to their original team
Freeze the destination team when creating an import job and serialize
imports with project moves. Use the frozen team for audit and webhook
events, and keep compatibility with existing jobs.
Select import audit props explicitly to prevent new job parameters from
being included in events by default.
AI-assisted-by: gpt-6.1-terra
* 📚 Document the import team fallback removal
Mark the legacy job audit fallback for removal in version 2.21.0.
AI-assisted-by: gpt-6.1-terra
* 🔧 Validate canonical AI model IDs in commit trailers
Require bare lowercase model IDs in AI-assisted-by trailers and cover
the validation with tests. Align the commit and PR workflows with the
same attribution rules.
AI-assisted-by: gpt-6.1-terra
---------
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
* 🐛 Keep all padding sides when setting one on a layout without padding
Setting one padding side on a board whose layout had no stored padding
(made through the API or MCP) saved only that side, for example {:p1 12}.
The backend rejected the shape as invalid.
Start a padding change from the four sides at 0 when the shape has no
padding yet.
Closes#13265
AI-assisted-by: claude-opus-5-5
* 🐛 Complete the layout padding after patching it
From the review: fill the four padding sides after the patch instead of
before, so a side cleared to nil also becomes 0, and any layout change
completes a partial padding saved before the fix.
AI-assisted-by: claude-opus-5-5
* 🐛 Leave gradient mode when undo removes a stroke gradient
Undoing a gradient with the color picker open sent a plain color.
The picker dropped the stops but stayed in gradient mode, so adding
a stop built a gradient with no coordinates or colors and applied it
to the stroke. The backend rejected it as an invalid shape.
Switch the picker to color (or image) when the color is no longer a
gradient, and skip invalid gradients before applying them.
Closes#13261
AI-assisted-by: claude-opus-5-5
* 🐛 Cover more colorpicker cases in the stroke gradient tests
From the review: plain and image colors still reach on-change through
the gradient guard, both gradient types leave the gradient tab, and a
plain color keeps the color tab. The image tab test is renamed after
what it checks.
AI-assisted-by: claude-opus-5-5
The legacy editor writes the attrs it gets into the data of an empty
paragraph, nil values included, so turning off a text decoration there
leaves :text-decoration nil. finalize-editor-state copied that data into
the shape content as it was, the only commit path that skipped
ensure-valid-text-content, and the backend rejected the shape. Build the
content with a helper that runs it, shared by both renderer branches.
Closes#13252
AI-assisted-by: claude-opus-5-5
* 🐛 Fix SVG upload frame when the selection is inside a group
With a shape selected inside a group, an uploaded or pasted SVG goes
into that group, but its frame-id came from the board under the drop
point. When the two boards differ, the save fails with invalid-frame.
Take the frame from the group instead.
AI-assisted-by: claude-opus-5-5
* 🐛 Keep SVG upload frame aligned with its parent
Keep the SVG upload frame and parent from the same source.
When a shape inside a group was selected, the frame for the new SVG
came from the board under the cursor while the parent came from the
group, so saving failed with invalid-frame. The parent and frame now
come from one shared predicate, which also prevents a repeat of the
original drift between two copies of the condition.
Add the board-parent test for the frame branch this change rewrote,
and make the group checker assert that the SVG exists and that its
frame is the expected one. Add mutation evidence for both.
AI-assisted-by: deepseek-v4.1-flash
---------
Co-authored-by: Luis de Dios <luis.dedios@kaleidos.net>
Text Editor v3 is now the default, so the label no longer tells anything.
Drop the TEXT_EDITOR_V3 render flag and the frontend code that set it.
The "WebGL rendering" label stays.
Closes#13289
AI-assisted-by: claude-opus-5-5
* 🐛 Give a color to the stroke created when its style changes
Changing the width, style or alignment of a stroke that a shape did not
have built the stroke from the style attributes only, with no color. The
backend rejected the shape as invalid.
Start from the default stroke, as the per-side width and the stroke width
tokens already do.
Closes#13263
AI-assisted-by: claude-opus-5-5
* 🐛 Read bool strokes in the multiple selection menu
The bool type lacked :strokes in its editable attrs, so the multiple
selection menu ignored bool strokes. With a bool without strokes and a
shape with one selected, the menu showed that stroke as shared, and
editing it created a stroke on the bool. Two bools with the same stroke
showed none.
Relates to #13263
AI-assisted-by: claude-opus-5-5
Add `gh.py create-pr` to create pull requests with automatic base detection,
optional issue linking and support for project and draft options. Normalize
and validate detected base branches, and report the created URL if issue
linking fails. Update the skill and workflow documentation, and cover the
command and base detection with tests.
AI-assisted-by: hy4-flash-free
* 🐛 Restore the WASM stack pointer after a failed call (#12978)
A failed render-wasm call traps without popping its shadow-stack frames.
Each failure leaked stack until it overwrote static data, and from then on
every call trapped as wasm-critical. h/call now saves the stack pointer
before the call and restores it on failure.
Closes#12977
Related to #12906
AI-assisted-by: claude-opus-5-5
* 🐛 Fix render-wasm panic when an auto layout has only absolute children
An auto flex or grid layout whose children were all absolute shrank to
zero, and a rotated shape below it got a matrix that cannot be inverted,
which panicked in `_propagate_modifiers`. Skip auto-size when there is
no content, as CLJS does. A matrix that still cannot be inverted is now
a recoverable error, which shows a toast instead of the error page.
Closes#12763
AI-assisted-by: claude-opus-5-5
* 🐛 Count hidden children in render-wasm grid auto-size
A grid takes its size from its tracks, so, like CLJS, it skips auto-size
only when every child is absolute. Flex still skips hidden children,
since its line building leaves them out.
Refs #12763
AI-assisted-by: claude-opus-5-5
Hovering a grid frame requested a full render. That clears the
canvas and walks every visible tile even though the overlay is
only UI. show_grid and hide_grid now re-present the last frame.
A grid takes its size from its tracks, so, like CLJS, it skips auto-size
only when every child is absolute. Flex still skips hidden children,
since its line building leaves them out.
Refs #12763
AI-assisted-by: claude-opus-5-5
An auto flex or grid layout whose children were all absolute shrank to
zero, and a rotated shape below it got a matrix that cannot be inverted,
which panicked in `_propagate_modifiers`. Skip auto-size when there is
no content, as CLJS does. A matrix that still cannot be inverted is now
a recoverable error, which shows a toast instead of the error page.
Closes#12763
AI-assisted-by: claude-opus-5-5
A failed render-wasm call traps without popping its shadow-stack frames.
Each failure leaked stack until it overwrote static data, and from then on
every call trapped as wasm-critical. h/call now saves the stack pointer
before the call and restores it on failure.
Closes#12977
Related to #12906
AI-assisted-by: claude-opus-5-5
WASM errors are thrown as an ex-info whose cause is the original failure
(the trap, `RuntimeError: unreachable`, `memory access out of bounds`,
`Aborted(OOM)`). The CLJS `format-throwable` printed only the ex-data and
the stack, so the report said where a WASM call failed but never why.
Add a "Caused by:" block with the cause message, printed on its own since
only V8 starts `.stack` with it, followed by its formatted data and stack.
Relates to #12910
AI-assisted-by: claude-opus-5-5
Closing a plugin removes its globals (console, penpot, ...) while a task
of the MCP plugin may still be running. Under SES a removed global reads
as undefined, so the task failed at its next use of console or penpot,
and the catch handlers failed again on console.error. The rejection
reached the workspace as "Cannot read properties of undefined (reading
'error')", for tasks that succeeded as well as for failed ones.
A task that ends after the plugin closed now returns quietly. It cannot
answer: the UI iframe and its WebSocket are gone, and the MCP server
already fails the task when the plugin connection closes. The outer
catch logs through the console reference taken at load, so it cannot
throw.
Tests: PluginTaskRequest.test.ts runs TaskHandler.ts and plugin.ts in
one sandbox, removes the globals while a task waits, and checks that no
rejection escapes and no error is logged when the task ends in success or
failure. A task that fails while the plugin is open still sends its error
response.
Closes#12503
AI-assisted-by: claude-opus-5-5
repair-file built every repair of a pass from the file data taken before
the pass. Repairs write whole values (a :mod-component with the whole
component, a :set with the whole :shapes vector), so two repairs on the
same component or shape attribute undid each other: the last write won,
the lost fix came back as an error, and each clash cost another pass.
Each repair's changes are now applied before the next repair is built.
A private repair-file* returns the data and the changes; repair-file
returns the changes, which give the same result when applied in order,
and repair-file-until-valid reuses the data instead of applying the
batch again (on the backend a second apply wrote an orphan page fragment).
Repairs now see what earlier repairs of the pass did, so
:ref-shape-not-found does nothing when its shape was removed or its ref
shape resolves again; it would otherwise detach a copy that an earlier
:invalid-main-instance-id repair had already relinked.
Tests stub repair-error, through a multi-arity fn so the JS build can
call it, and cover two clashing errors on one component in either order,
three missing children fixed in one pass, and repairs on removed shapes.
Closes#13239
AI-assisted-by: claude-opus-5-5
Switching a variant copy that sits inside another copy dropped a component
swapped inside it, and the new variant showed its default child. Undoing
a variant switch also lost a swapped child: the old variant came back with
no child in that place.
When the swap was made in the copy, the original shape of the swapped
child was looked up from the nearest main, which is the copy in the outer
main, so it had no match in the variant main. Look it up from the match
of its parent in the variant main instead.
When the swap was made in the outer main, the child had no slot of its
own, so it was deleted with the old copy and never moved. The new
ctf/get-outer-swaps finds these heads by walking their ref chain up to
the variant main. The delete step and keep-touched both use it, so they
pick the same heads: kept off the delete list, moved into the new copy
and pointed to the swapped-in component, with the slot of the child they
replace. The walk that advances the refs of a subtree moves to
ctf/get-advanced-refs, which the clipboard now shares.
When the switch kept a swapped child, the undo of its move into the new
copy put it back under the old copy id. That id is also the id of the new
copy, so undoing the creation of the new copy removed the child.
change-parent now takes the undo parent from its objects, as it already
did for the previous sibling.
When the new variant had no match for a swapped child, the child was
removed with the old copy, with no undo entry. Move it to the root first
and delete it from there, after the rest of the switch, so undo brings it
back after the old copy.
Closes#13179Closes#13181
AI-assisted-by: claude-opus-5-5
Plugins and the MCP could not tell whether the new render engine (WebGL)
or the SVG engine draws the open file.
Add file.features with the sorted features of the open file: its stored
features plus the features active in the session. render-wasm/v1 comes
from the session alone, so it is present only when WebGL draws the file,
whether the renderer comes from the wasm query param, the profile setting
or the workspace menu. The backend never stores that feature on the file,
so the stored features alone cannot answer it. For any other file, such
as a library or a File kept after opening another file, features is null.
Add penpotUtils.isWasmRenderer() to the MCP plugin and list it in the
MCP instructions. It throws a clear error when the Penpot version does
not expose the file features. Regenerate the MCP API docs, which also
picks up the missing penpot.location entry, and the plugin API test
suite surface.
Add plugin API test suite tests for the open file and for a file that is
not open. Note in the plugins memory that every new or changed Plugin API
member gets a suite test whenever the suite can reach the case.
Closes#13167
AI-assisted-by: claude-opus-5-5
Page switches tear down the WebGL canvas before openPage resolves, so
font-stored? must not call _is_font_uploaded against a null resource
pool. Guard with wasm/live? like the other font FFI helpers, and cover
the skip path with a unit test.
Closes#13205
Keep the release procedure in one place and separate review from GitHub
writes. Clarify how to prepare and verify release highlights.
Report each successful label edit so earlier changes remain visible if a
later edit fails.
AI-assisted-by: gpt-6.2-sol
Gather milestone issues, pull requests, advisories, and changelog checks
into one JSON snapshot. Reuse it across the release workflow to avoid
repeating GitHub queries while keeping write actions separate.
AI-assisted-by: gpt-6.2-sol
Use GitHub's cursor pagination for repository advisories and flatten the
returned pages.
Remove empty breaking-change sections and document the changelog contract.
AI-assisted-by: gpt-6-luna
* 🐛 Center the disabled invite button in the empty invitations state
The disabled button sits inside a tooltip trigger, a fit-content grid
that the text-align of the empty state does not center. Center the
trigger with auto inline margins.
Closes#13173
AI-assisted-by: claude-opus-5-5
* 🐛 Make the disabled primary button label readable in the light theme
In the light theme the label of a disabled primary button used the
background secondary color on the muted accent background, so both were
almost the same. Use the tertiary accent for that label in the light
theme only, as design asked. The dark theme keeps its colors.
Closes#13171
AI-assisted-by: claude-opus-5-5
* ✨ Ship telemetry shadows with a cursor consumer
Send anonymized audit events through a dedicated telemetry consumer,
including when Nexus or admin-console also persist full events. Keep the
legacy payload and cadence of 10,000 events per chunk and three hours
between passes. Nexus skips shadows to avoid archiving duplicates.
Move shadow deletion to the audit GC. Delete full rows and shadows along
independent cursor paths, and expire shadows after seven days even when
they have not been sent. Run the deletion paths in parallel with bounded
batches, separate time budgets and independent failure handling.
Replace the shared consumer catalog with transport definitions and one
generic pass runner. Keep the legacy telemetry report and newsletter in
the scheduled task, and update the tests, memories and rollout runbooks.
Addresses F1 of the audit-log consumer review.
AI-assisted-by: deepseek-v4-flash
AI-assisted-by: gpt-6.1-terra
* 🐛 Address audit log consumer review findings
Enable audit log GC by default and document how to pause it during rollout
or before registering a consumer that needs a complete replay.
Run GC paths in order on the runner thread. Count each committed batch and
preserve partial totals on ordinary failures while propagating interruption.
Skip full-row payloads in telemetry queries and decoding. Keep the age
limit for local retention only, and document the shared pass contract.
AI-assisted-by: gpt-6.2-sol
* 🐛 Close audit log consumer review findings
Verify telemetry counts processed and skipped events in a mixed batch.
Clarify how to pause GC, the scope of the replay race, and what the
retention warning counts. Remove private Nexus setup from the public
upgrade runbook.
AI-assisted-by: gpt-6.2-sol
* 📚 Simplify the audit log guide
Consolidate the guidance on event trust, privacy and delivery. Keep examples
that explain why the design works and link to code and runbooks for details.
Clarify replay limits and distinguish age-based deletion from missed delivery.
AI-assisted-by: gpt-6.2-sol
* 🐛 Repair variant property set when removing a property
Removing a property could leave two variants with the same value
combination. The remaining property vectors now go through
ctv/sanitize-properties-set, and each main's variant name is refreshed, so
the set stays valid, as the 0038 migration leaves it.
On a clash, the variant higher in the layers panel keeps its values and
the lower one gets a " (n)" suffix. The plugin docs for removeProperty
say so.
The rename-in-layers path removes properties that are empty in every
variant. That cannot make two variants equal, so it skips the clean-up:
a duplicate made by the rename stays and its warning shows.
Closes#12959
AI-assisted-by: claude-opus-5-5
* 🐛 Keep the top variant on a clash in migration 0038
Migration 0038 cleaned the members of a set in :shapes order, so on a
value clash the bottom variant in the layers panel kept its values and
the top one got a " (n)" suffix. The top variant is the primary one, and
removing a property already keeps it. update-variant-container-properties
now passes the members top first, so both paths agree: the primary
variant keeps its values and its property names lead the set. 0038 is
not in a release yet, so it changes in place.
The removeProperty plugin docs now cover three or more clashing variants
and all-blank values, and the plugins CHANGELOG has an entry for the fix.
AI-assisted-by: claude-opus-5-5
* 📚 Update user guide for 2.20 features
- WebGL rendering is on by default for new accounts.
- Text copied in Penpot keeps its formatting when pasted.
- Detach reference in typography and shadow token forms.
- Saving: retries and read-only mode while saves fail.
- Version restore message for people who have the file open.
- Esc closes the layer search, history and shortcuts panels.
- Ctrl/Cmd+click opens files and projects in a new tab.
- Import steps and per-file export progress; current export
option labels, including Link matching libraries on import.
AI-assisted-by: claude-opus-5-5
* 📚 Apply review precisions to the 2.20 user guide
Cancelled imports keep the files that already finished. Pasted text
detaches typographies instead of removing them, and only gets the default
fill when the image was its only fill. Detach reference is a hover icon.
A single match you can't edit also asks for the library.
AI-assisted-by: claude-opus-5-5
The MCP controller restarts its runtime when the profile id changes, and
it compared ids by object identity. Leaving the workspace clears the
transit uuid cache, and on the first visit it also saves the
workspace-visited prop, which reloads the profile. The reloaded id came
back as a new uuid instance, so MCP init ran again: it closed the plugin,
dropped the WebSocket and left the new plugin disconnected.
Compare profile ids by value, and add a regression test that sends the
same id as two distinct uuid instances.
Closes#13128
AI-assisted-by: claude-opus-5-5
The new backend flag `file-change-retention`, off by default, makes
file-gc skip its media clean-up (deleted components, unused media
objects, and thumbnails). That clean-up roots only in the head and the
snapshots, so it would remove media that a kept revision row still
names. The file and fragment clean-up still run: revision rows name
neither.
penpot#13187 keeps revision rows under the same flag. Set the flag only
where both are deployed. An instance that rolls back to this release
with the flag still set keeps the media its retained history needs.
AI-assisted-by: claude-opus-5-5
* 🐛 Scope share-link component reads to the allowed pages
A page-scoped share link exposed the primary file's components
map in get-view-only-bundle and authorized the file's components
fragment in get-file-fragment, leaking the stored shapes of
deleted components from pages the link excludes.
The share-link bundle now trims the primary file's components to
those referenced transitively from the allowed pages and emits them
inline; the membership path keeps the full map. The fragment scope
check no longer grants the components pointer to share links;
allowed page pointers remain readable.
AI-assisted-by: inkling-2-small-free
* 🐛 Tighten share-link bundle component retention
The share-link view-only bundle now carries only live components
referenced transitively from the allowed pages; deleted components
never travel (their stored shapes are the main vehicle of leaked
excluded-page content). This drops the reachability walk at deleted
references and removes the duplicated subtree helper in favor of the
canonical get-component-shapes.
Also adds membership retention and cycle regression tests, and drops
the private advisory identifiers from the new test comments.
AI-assisted-by: inkling-2-small-free
* ♻️ Apply the second review's fixes to the share-link fix
Ordering the namespace require so the format gate passes, renaming
the working bindings to what they hold, documenting the eager-realize
limitation at the realization site, sharing the same-file reference
predicate, and switching the fragment scope check to an allowlist of
the pages scope.
Test markers are anonymized; the walk-through-deleted contract and
the full-scope link get dedicated tests; pointer-mapped files assert
an inline referenced component and the empty-components form.
AI-assisted-by: inkling-2-small-free
* ♻️ Apply the third review's minor fixes to the share-link fix
Correct the comment about realization reuse, align the new test bindings,
and drop the tautological fixture assertions. Cover the fragment scope
for excluded pages, membership on pointer-mapped files, and the legacy
same-file reference form; make both permission memories state the
actual invariants.
AI-assisted-by: inkling-2-small-free
* 🐛 Scope the share-link library trim to the emitted bundle
The library trim walked the primary file's full components map, deleted
components included. A deleted component keeps its main-instance subtree
in :objects, so a library component instanced only inside those stored
shapes was retained in the linked libraries of the view-only bundle and
reached anonymous share-link viewers, metadata and stored shapes
included.
Walk the data the bundle emits instead: pages scoped to the link plus the
trimmed components map. Pages still come from the realized file, because
pointer-mapped pages only load in their own loader.
Covered by a regression test that instances two library components inside
a deleted primary component: only the library component the link's page
references survives the trim.
AI-assisted-by: deepseek-v4.1-flash
When pasting, read each child to advance from the objects being built,
not from the page, so a later change to the parent cannot make it read a
stale shape.
Fix the docs of ignore-children-fn in get-children-ids and delete-shapes:
it receives a shape id, not a shape.
Add a unit test for ctf/get-swap-level, a paste test where the swap sits
at the last level the copied head drops, and a detach test where the
swapped copy sits under two non-swapped nested copies.
AI-assisted-by: claude-opus-5-5
When a variant nested in a copy of a deleted component was switched, the
overrides made in that component's main were dropped: the lookup of the
matching shape in the original variant main stopped at the deleted
component, so the touched attributes were never copied.
Follow deleted components in find-shape-ref-child-of, like the ref chain
walk that collects the touched flags already does.
Closes#13177
AI-assisted-by: claude-opus-5-5
Detaching a copy moved the shape-ref of every shape under its first-level
nested copies up one level. Below a nested copy swapped in the detached
copy itself, the swap already points it into the swapped-in main, so its
children ended up one level too far and the detach failed to save with
:missing-slot.
Skip those swapped nested heads, and their descendants, when advancing
the nesting level.
Closes#13176
AI-assisted-by: claude-opus-5-5
Copying a copy nested inside another copy moved the shape-ref of every
shape under it up by the same number of levels. Below a nested copy that
was swapped in one of the dropped levels that count is too high: the swap
already points it into the swapped-in main, so its children ended up one
level too far and the paste failed to save with :missing-slot.
Count the levels per nested head instead, stopping at the level where it
was swapped (new ctf/get-swap-level), for the copied head too. The ref
chain used to collect touched flags now also follows deleted components,
like advance-shape-ref already did, so inherited slots are kept.
Closes#13076
AI-assisted-by: claude-opus-5-5
* 🐛 Fix compile warnings in the frontend test tree
The frontend test build printed 25 analyzer warnings, all of them in test
namespaces: 7 :fn-arity and 18 :infer-warning.
The arity ones were latent bugs. Both builds use the :esm target, where a
call that crosses a namespace boundary becomes a plain JS call, so CLJS
arity dispatch never runs and the missing argument arrives as undefined
instead of throwing: the warning was the only signal. One `wait-for` call
had no message, and five `interaction-proxy` calls still passed five
arguments after the six-argument signature landed in #11621.
The rest were JS property reads whose target type could not be inferred
(proxies, atoms, awaited promises). A `^js` hint on the target fixes them,
the convention already used under src/. Inside `set!` a form-level hint
does not reach the target, so the two per-side stroke widths bind the
stroke first.
Test behavior is unchanged: the same 27 tests in shape-bugfixes-test keep
their 63 assertions, and the full frontend suite passes (1901 tests, 7686
assertions). The memories record why `:fn-arity` cannot be ignored in this
build and how to force a clean recompile before checking for warnings.
AI-assisted-by: deepseek-v4.1-flash
* ♻️ Split the tokens plugin tests into one test per case
`tokens_test.cljs` drove five tests from `doseq` tables, one of them a
nested loop over three catalogs and seventeen mutations. A failure only
named the case through its `t/testing` label, and the nested one shared a
single store across all fifty-one combinations.
Each row is now a test of its own: twelve stroke property edits, four
`tokensSource` rejections, seventeen catalog mutations (each asserting the
local, source and other connected catalog), five activation changes and
three token application paths, taking the namespace from 67 to 104 tests.
Fixtures (`stroke-tokens-fixture`, `external-tokens-fixture`, ...) keep the
arrangement in one place, and every test builds a fresh store.
Two helpers return JS objects with `^js` on their names, so the test bodies
stay free of interop hints. Assertions drop from 430 to 345 because the
cross product no longer repeats `isEditableTokens` and `tokens-unchanged?`
once per catalog and mutation; every write is still asserted against the
three catalogs.
`mem:testing` now says tables are for short identical bodies only;
`frontend/testing` records the `defn ^js` return-tag trick.
Verified: namespace 104 tests / 345 assertions, full frontend suite 1938
tests / 7601 assertions, 0 failures; test build 0 warnings; cljfmt and
clj-kondo clean.
AI-assisted-by: deepseek-v4.1-flash
* 📎 Apply suggestion from @elenatorro
Co-authored-by: Elena Torró <elenatorro@gmail.com>
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
---------
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Co-authored-by: Elena Torró <elenatorro@gmail.com>
* ♻️ Rework audit-log consumers and jobs substrate
Fold the implementation, follow-up fixes, migrations and tests into one
code commit.
AI-assisted-by: gpt-6-luna
* 📚 Consolidate 2.20.0 upgrade runbooks
Keep the operational upgrade procedure and its supporting runbooks in a
separate documentation commit.
AI-assisted-by: gpt-6-luna
* ♻️ Remove the audit-log flag and derive persistence at boot
Persistence now follows the consumer flags instead of a separate switch.
app.config computes cf/audit-persist? once at boot from :nexus and
:admin-console, and every write site reads that value, so request paths
no longer check flags per event. With no consumer enabled no full rows
are written; telemetry shadows and webhook deliveries keep their own
flags. The frontend wire signal stays :audit-log as a derived value.
Update the 2.20 runbooks, memories and the devenv flags to match, and
migrate the tests that used to toggle :audit-log directly.
AI-assisted-by: hy4-flash-free
* 🐛 Accept error-reporting batches and precompute sink flags
push-audit-events now accepts crash batches with :error-reporting alone, so
the frontend signal from get-environment-data matches a real destination.
The reporters receive unhandled-exception events without storing any row.
All per-event sink checks read booleans computed once at boot: webhooks,
telemetry and error reporting join audit-persist? in app.config. The test
fixture and with-audit-config rebind all four values together, and the
tests that toggled those flags directly were migrated.
Address F2 of the review of the previous commit. F1 stays deferred to a
separate plan.
AI-assisted-by: hy4-flash-free
* 💄 Match the layout cljfmt expects in the flags set
The first comment of the varia set sat on its own line after the opening
delimiter, and cljfmt joins such a comment to the delimiter line, so the
Common Tests lint step failed on common/src/app/common/flags.cljc. Keep
the comment on the opening line, the same shape the login and email sets
already use.
Note in mem:scripts/ci that the backend lint lints ../common/src but does
not format-check it, so common has to be passed to scripts/ci as well.
AI-assisted-by: deepseek-v4-flash