Repository navigation
feat(animations): object animations and slide transitions, with a PPTX round trip - #595
naohito2000 wants to merge 88 commits into
Conversation
…ntract Pin PowerPoint forced-object naming and p159 Morph variants before the general timing writer is introduced. SPEC: 20261030-2256_pptx-animations-transitions-roundtrip Task: 1
…tracts Add independent feature switches, animation and transition validation, semantic asset rules, and bounded XML parsing. SPEC: 20261030-2256_pptx-animations-transitions-roundtrip Task: 2
…otion capabilities Freeze the independent GUI universe, compile an explicit 435-candidate PowerPoint oracle, and generate a provenance-aware capability catalog. SPEC: 20261030-2256_pptx-animations-transitions-roundtrip Task: 3
…ng OOXML Add the shape/effect identity layer and the semantic animation/transition writer core. - stable element/effect identity with extension-backed IDs and deterministic fallback, remapped across every spid-bearing node - main sequence and interactive sequences with valid cTn ID/order - transition writer including all Morph variants and advance modes - gap-safe generation: capture-required mappings refuse with their stable catalog key instead of emitting guessed XML - animation-off preserves media timing; transition-off leaves object and media timing unchanged
…ally Add the inverse direction: a GUI-edited package becomes semantic slide JSON, and anything not fully understood is preserved rather than partially decoded. - all-or-nothing classification; one uninvertible attribute sends the whole tree to a raw sidecar instead of emitting lossy semantic JSON - mc:Choice evaluated in document order against the supported namespace set, then mc:Fallback, then raw or a deterministic error - hashed dependency manifest with shape/relationship remapping; a missing target or relationship fails before output instead of emitting a dangling rId or stale spid - media-only reconstruction for animation-off from a mixed raw tree - import derives the deck switches and preserves explicit ones - bounded parsing with IMPORT_LIMIT_EXCEEDED, no DTD or external entities, and hostile fixtures asserting zero network/filesystem/subprocess calls
…sure, diff Expose the feature through every surface and replay preserved motion. - independent animation_mode / transition_mode (inherit|on|off) on the API, the CLI and both MCP servers; caller beats deck.json and no override rewrites it - PPTXBuilder now replays _rawTiming / _rawTransition, which was implemented in Task 5 but never called, so an imported raw slide kept losing its motion - remote _prepare_workspace materializes the validated manifest closure instead of scanning slide JSON strings - diff reports transition field changes and animation add/remove/move by stable effect ID, summarizing raw by digest and target names
…tion guide Keep the detailed contract out of always-loaded composer context. - animations.md is the single canonical contract; the always-loaded slide spec gets a short pointer only - composer loads it only when a deck switch is on or an assigned slide already carries motion; the orchestrator owns the switches - import and hand-edit sync describe semantic extraction, the raw sidecar, and switch derivation vs preservation - the guide states what round-trips today and names the catalog key of every refused setting, rather than promising what the writer declines to emit - a slide must carry its whole meaning with motion off
…ance gate Add the release gate and make the remaining gaps countable. - coverage-matrix.json is derived from the catalog by rule, not curated, so no one picks the interesting cases; two runs are byte-identical - accept.py writes every accepted fragment, re-imports it, and checks cTn uniqueness, schema order, spid/rId validity and the eight fixture packages - the --powerpoint read-back path is implemented, bounded by a hard timeout, and never approximated; this sandbox reports it as blocked, not passed - exits non-zero while any gap remains, printing each one with its stable catalog key so the list is a work queue
…ured duration Every gallery tile's semantic JSON carried the generic 500 ms carrier default regardless of its own capture, and only 35 of 104 happened to agree. Four tiles whose sole behaviour child is the normative visibility p:set are instantaneous in the capture, so the claim contradicted the evidence the entry came from and broke the round-trip the acceptance harness measures. - derive a tile's timing.durationMs from its own observedChildDurationMs, emitting null only when the effect is a lone visibility toggle - give the writer's exit path the symmetric rule: with no accompanying animation there is no active duration to hide one millisecond before, so the state change sits at the effect start as an entrance does - derive the raw manifest root in PPTXBuilder the same way the remote workspace derives it, so the two sides cannot disagree about where a declared part lives - drop a reference to list_guides(), which no longer exists Round-trip equality is 118/118 and the partial-round-trip gap is now zero. The exit-delay rule is inferred from the captured rationale, not measured; Task 8 PowerPoint read-back has to confirm it.
…apture loop Apple Events are refused in this sandbox, but the Accessibility API is not, so the oracle was reachable after all. One capture was driven end to end as proof: sdpm generates the deck, PowerPoint applies the effect through the ribbon, the file is saved, and --parse-oracle merges the extracted OOXML. - record the measured driving mechanics: element_index works for menu items but never for the main window, app_post clicks are ignored by the custom ribbon, and the pointer tooltip refuses a repeated click at one point - record the gallery position formula, confirmed against the tree, so a batch can sweep by page instead of probing - Box / From Right carries the direction in isInverted, not a dir attribute, which is the question Step 1 exists to answer - the deck opened with no repair prompt and only the targeted slide changed Two things this does NOT do. It promotes no catalog entry: the GUI applies by label, so a capture maps a tile and an Effect Options label to OOXML, while the 262 capture-required entries are keyed by scripting enumerator, and bridging those is a name correspondence rather than a measurement. And it leaves Box's defaultDurationMs at the recorded 1000 even though PowerPoint wrote 1600, until the other three directions say whether 1600 is the tile's default.
… oracle Run from a Terminal holding the Automation grant, the scripting oracle probed 357 candidates and closed every transition gap the catalog was guessing at. - all 61 capture-required EPPEntryEffect entries now have measured OOXML: box down is p14:prism dir="d" isInverted="1", airplane right is p15:prstTrans prst="airplane" - the 196 rejections are the legacy per-shape entry effects the catalog already accounts for out of scope, so they are an answer, not a gap - applying by enumerator code gives the enumerator -> OOXML mapping the catalog is keyed on, which the GUI route cannot: GUI "From Right" wrote isInverted with no dir, so the GUI label is not the scripting enumerator Animations captured nothing. All 150 MsoAnimEffect candidates were rejected with "main sequence ... doesn't understand the add effect message": the sdef declares it, 16.113.1 does not implement it. The animation side has to go through the GUI procedure instead, and no terminology fix will change that. The run aborted before savePackage on a bare enumerator name that collides with a PowerPoint property, so this package was saved by hand from the still-open deck. Both defects are recorded but not yet fixed.
…the catalog Make the captured oracle evidence a generator input, so every transition the catalog describes now stands on what PowerPoint wrote rather than on a guess read off the enumerator's name. - capture-required entries drop from 262 to 203; the transition surface has one refusal left, and it is not waiting on a capture - the capture corrects 16 mappings the catalog had inferred from names: cube right is dir="u" not "r", the glitter pairs were swapped, and invX belongs to the LEFT prstTrans variants, the opposite of what was recorded - flashbulb no longer leans on a same-shaped tile; PowerPoint wrote p14:flash for the enumerator itself - 15 entries keep an attribute PowerPoint omitted, recorded as keptAttributes with the fact that their being schema defaults is not measured - the captured p14:dur is NOT taken as an effect default: all 160 transitions report 2000, which is the probe slide's own duration, and taking it would have overwritten 22 distinct measured defaults with one artefact Fix the two defects that nearly cost the whole capture run: - the generated constants arrays carried bare enumerator terms, four of which are also PowerPoint property names, so evaluating one raised -1728. They now carry codes. A «data …» literal was the obvious fix and is wrong twice over: the descriptor type must be the enumeration's own code, and a «data …» value is not equal to the read-back constant, so every record would have reported applied: null. horizontal and vertical turn out to have been binding to a different enumeration entirely, which failed silently. - one failed probe used to discard every candidate applied before it. Each probe is now contained and records its failure, the package is written after every probe, and savePackage always runs.
…nscriptable PowerPoint.sdef declares two ways to create an animation effect. Neither is implemented in 16.113.1, so the oracle's animation half was never going to work and no terminology fix reaches it. Each route got its own slide and shape, and the saved package is an independent check: four slides, one shape each, no p:timing and no p:cTn. - add effect on main sequence -> -1708, not understood - make new effect at main sequence -> -2710, Can't make class effect - make new effect at sequence 1 -> -2710, same - add effect on sequence 1 -> -1728, because an indexed sequence does not exist until an effect does, so it is not an alternative address An earlier run of this probe appeared to say two effects had been created and I passed that on. It was wrong: AppleScript's return is a carriage return, the terminal overwrote each verdict with the next, and the digit came from an overwritten line — in a version that also shared one slide across all four routes, so no count could have been attributed anyway. This version writes JSONL to a file instead of printing. Every remaining capture is animation-side and has to go through the GUI.
AXPress through computer_perform_action applies a ribbon gallery tile by element index, including a tile scrolled outside the visible band, and it works on main-window elements. Pressing Entrance Effects' "Basic Swivel" at window x=1448 inside a 320-pixel gallery applied it, flipped the thumbnail to Has Animation, and set Start: On Click with Duration 05.00. This morning's note said only a real-pointer click drives the ribbon and that a batch therefore occupies the machine for hours. That was tested with computer_click alone, which does always fail on the main window; the limitation belongs to that one tool, not to the accessibility route. So the capture needs no coordinate arithmetic, no gallery paging, no tooltip avoidance, and no pointer takeover, and the operator keeps their machine. Also recorded: a gallery lazily materializes its tiles. A first read of Entrance Effects returned 22, and after one press the same read returned five tiles that had not been there. Never cache a first read as the whole gallery. AXShowMenu on the gallery reports success and opens nothing, so there is no full-grid shortcut.
Step 6 listed @path, @origin and @pathEditMode as the values no available capture contained. All three are now measured, with a presetID the catalog did not have: <p:cTn id="5" presetID="42" presetClass="path" presetSubtype="0" accel="50000" decel="50000" fill="hold" grpId="0" nodeType="clickEffect"> <p:animMotion origin="layout" path="M 0 0 L 0 0.25 E" pathEditMode="relative" ptsTypes=""/> Record the two tool rules that caused most of this session's GUI friction, neither of which is a PowerPoint limitation: - perform_action needs one explicit computer_get_state immediately before it, with nothing in between. A click's refreshed tree does not register, and until you provoke the honest "no state ... call computer_get_state first" the symptom is the misleading "element N is no longer present", which reads like PowerPoint invalidating its own elements. - a popup's window is invisible to a click's own refreshed tree and appears on the next explicit read, so a click's output is not evidence that the popup failed to open. accel/decel at 50000 arrived with the path preset and is NOT promoted to animation.timing.smoothStart/smoothEnd: that is this preset's default, not a measurement of those controls.
…ally costs Two measured constraints that rule out the obvious shortcuts. A gallery press REPLACES the shape's effect rather than adding one; there is no Add Animation button on this build. Pressing three tiles onto one shape leaves one effect, the last. So a batch needs one slide per value. Indices shift as soon as a press scrolls the gallery. perform_action does keep state across consecutive actions, so presses can share one read, but only while the tile list holds still — and a press breaks that. After one press the Entrance gallery scrolled and materialized five tiles, so the index that had been Checkerboard was Shape. A press aimed by a stale index applies the wrong effect while the record names the intended one, which corrupts evidence instead of failing, so re-read before every press. The cost per value is four calls: select slide, select shape, read, press — and the two clicks invalidate the state the press needs.
… loop Driving the ribbon by hand costs four agent round trips per value, which does not fit a session. The accessibility API is reachable from Python here (AXIsProcessTrusted is true), so the loop becomes one script. - gui_capture.py drives it: resolve every control BY TITLE against a fresh read before each press, because a press scrolls a gallery and renumbers it, and a press aimed by a stale index applies the wrong value while the record names the right one - a target that is absent, ambiguous or unverified becomes a rejected record and the run continues; every wait is bounded. One bad term cost the AppleScript run all 357 of its applied candidates - the click point for the canvas shape is derived from the package geometry, the live pane frame and the live zoom, never hardcoded - gui_capture_plan.py derives the target list from the catalog's own gaps, so re-emitting after a run yields a shorter plan with no edit, and sorts every capture-required entry into one of four named lists rather than dropping any - 76 runnable targets, 51 deferred with a stated reason, 185 scripting enumerators set aside because the GUI applies by label and closing those would assert a name correspondence rather than measure a value - the accessibility layer is injected, so 84 new tests run with a fake and CI needs neither PowerPoint nor pyobjc
…exposed Both were invisible offline and both made every target fail. Pressing a ribbon tab that is ALREADY active collapses the ribbon, taking every control on it out of the tree. A run against a deck whose Animations tab was already selected pressed it anyway and all 76 targets then waited for a gallery that had stopped existing. The tab is now pressed only when its own controls are not already reachable. The editor pane was chosen as the largest element of a fixed role, which returns the outer split holding the navigator and the notes — 254 px too wide and 188 px too tall. It is now the framed container holding the element that titles itself "Slide Editor Pane". The inner area's own frame lags a ribbon expand or collapse, measured once as y=89 h=594 while its container already reported the settled y=144 h=540, so the container is what gets measured. Still failing, and recorded rather than papered over: the driver cannot find the Quick Access "Save" button from the document window, so the attribution gate never gets a package to read; and the canvas clicks miss the 100x22 pt shapes, which leaves the previous shape selected so the next press overwrites ITS effect. A live run produced 71 presses and five effects, one of them an entrance class on a shape whose target was an emphasis value. The driver rejected all 76, which is the gate working.
…on captures Nine targets captured with their spid matching the shape the plan aimed at, so these are measurements rather than hopeful presses: entrance flyIn is presetID 2 subtype 4, zoom is 53/16, basicSwivel 19/10, flip 56, peekIn 12/4, pinwheel 35, spiralIn 15, and emphasis underline 18 and wave 34. Three defects fixed, each found only by running it: - the shapes were 77x22 pt and a click's accuracy is bounded by the SHORT side. Squarer cells and a one-line label take it to 43.5 pt. The key is not lost: it is in the plan, and attribution is by spid - the ribbon tab was selected AFTER the shape click, but the click is confirmed by that tab's gallery becoming enabled and a gallery on an inactive tab is not in the tree at all, so a freshly opened deck starting on Home timed out all 76 targets before clicking anything - PowerPoint publishes TWO AXWindows with the SAME document title and only one carries the ribbon. Taking the first non-popup picked them inconsistently: one run reached Save on target 1 then failed every later one with "no element titled 'Animations'". The document window is now the one holding the ribbon tab strip Two causes remain, both named by the records rather than guessed at. A compound effect writes more than one p:cTn, so the "exactly one more effect" gate is too strict and reports effectNotAdded with "0 before and 3 after". And some clicks still do not change the selection, which shows up as "3 before, 3 after, spids that appeared: none". Five more are a derived tile label that does not match the live one, which the record names.
… run 76 43 of 76 animation values captured, every one attributed to the shape its plan aimed at. Previous best was 2 of 12. Selecting a shape by clicking a derived point does not work: the operator watched the pointer land correctly while the shape stayed unselected, and pacing the synthetic click properly took it from 2/12 to no better. Shapes have no accessibility element, but their Selection Pane rows do, and a row carries the shape's name and a settable AXSelected. So the driver opens the pane once and selects by name. The coordinate click is gone, with the canvas geometry it needed, and the driver no longer moves the pointer at all. Then it was four minutes a target, and measurement said why: a full window walk costs 6.4 s because every attribute read is an IPC round trip, the window is 907 nodes of which 762 are pane rows, and document_window walked every one of five same-titled windows looking for the ribbon. Lookups are now scoped to the toolbar, the ribbon tab group or the pane outline, found by a depth-bounded search; document_window reads direct children. 8.9x fewer reads per target, asserted as a budget so it cannot creep back. Saving turned out to be ~1% of it — batching it ten at a time is still in, and it gives up crash granularity and the ability to separate two targets inside one batch that swapped effects, so the misattribution gate runs at batch size 1. 76 targets in 11.5 minutes, resumable. Two live-only facts the offline tests could not have found. Opening the Selection Pane adds a SECOND AXTabGroup to the window, so the ribbon needs its own first tab to be identified. And the pane publishes only the rows scrolled into view — 62 of 152, then 47 — which is what the remaining 26 controlNotFound failures are, each naming the names it did see.
…dex, not name A row's name is published only once it has been scrolled into view, so one run's batches read 80 names then 54 from the same 152 rows and 11 targets were rejected as 'no Selection Pane row is named ...' for rows that were selectable throughout. Rows are now addressed by index - the shape's position in reverse z-order, read offline from the package - verified against the live pane twice at 152 rows with 0 mismatches. The name is kept as a check on that order when the pane publishes one. A count check guards the index: the pane must publish exactly one row per shape or the selection refuses, which costs the ability to isolate a single missing row and buys refusing to apply a value to the wrong shape. The fake inflates the slide rather than the pane, models rows that publish no name, and runs the whole plan with zero readable names.
…own AXIndex Addressing a row by its offset in AXRows refused 7 targets: the pane published 43, 54, 61, 63, 74, 88 and 91 rows on consecutive reads of the same 152-shape slide, because it rebuilds while the application works. An earlier probe that answered 152 rows had measured a pane scrolled by hand, so both the previous docstring and the previous notes entry were too strong. Every row publishes its own AXIndex - measured 0, 1, 76 and 151 at those offsets - so a row is now found by matching that, a partial read is usable whenever it holds the row wanted, and a read that does not is retried until the timeout. The name stays as a check on the order: a row that publishes a name must publish the one expected at that index, which is what catches a renumbered pane before a press lands on another shape. Live: 73 of 76 captured, 0 spid mismatches, 0 row failures. The 3 remaining are gallery tiles the ribbon does not publish.
…ues captured Three defects stood between 73 and 76, each measured against the live ribbon: - the accessibility layer drops a tile's ampersand and keeps the spaces around it, so 'Grow & Turn' is published as 'Grow Turn'. title_variants derives that spelling as an alternative, with the exact title still tried first. - a gallery shows a window of its effects and is moved by the ribbon's own 'Previous/Next <gallery> gallery' buttons. AXScrollUpByPage and AXScrollDownByPage on the gallery's AXScrollArea are accepted and do nothing - a run paged 8 each way and no tile appeared - so the scroll_page binding is gone and the pagers are pressed by title, bounded, up before down because a press leaves the gallery wherever it was. - pressing a gallery whose palette window is already open CLOSES it, the third appearance of a trap that already cost a run twice (an active ribbon tab, the Selection Pane). The window's presence is now read, not assumed. Live: 76 of 76 captured, 76 attributed, 0 spid mismatches.
…animation capture 23 entrance, 24 exit, 24 emphasis and 5 motion paths, every one attributed to the shape its target named. Not in the catalog yet: generate.py ingests transition captures only, and the README says so where the files are.
…payloads offline generate.py --parse-gui-capture joins the driver's read-back with the package it saved, on attributedSpid, and recovers per effect every behaviour child WITH its payload: the element and its attributes, p:cBhvr/@additive, the cBhvr/cTn timing with the delay lifted out of p:stCondLst, the p:attrNameLst names, and the to/from/by/tavLst value subtrees. 76 records, 76 effects, 76 resolved, 0 unresolved, 311 behaviours. This is the payload gap that kept 71 tiles capture-required, measured. It needed no re-run: PowerPoint had already written it into the package. Nothing is promoted into the catalog here. writer.py writes one behaviour per distinct tag and synthesises each payload from general rules, and 57 of the 76 measured effects repeat an element, so promotion needs a measured-behaviour path in the writer first.
…does to the XML Applying a tile selects the effect (with only the shape selected the Duration incrementor is disabled and empty), AXIncrement steps it by 0.25 s, and the saved package says what changed. 4 effects, 41 behaviours, ratios x2, x3/2, x9/8. Every animated behaviour's dur and delay scale in proportion. The visibility p:set is exempt: dur stays 1 and its delay is recomputed from the new duration, not scaled - Fly Out is 499 at 0.50 s and 999, not 998, at 1.00 s. No attribute changes, and neither does presetID, presetSubtype, the behaviour count or order. One measured limit: at a fractional ratio, values whose exact product is a half split both ways (580 down, 1324 up), which is PowerPoint's internal float precision rather than a tie rule. So output is byte-exact at an effect's measured default duration and may differ by 1 ms elsewhere.
… paths are measured Step 6 said no available capture contained a preset path. The GUI capture does, all five gallery groups verbatim with their presetIDs. Only the More Motion Paths dialog entries are still open.
…animations The catalog promotion, the writer path and the reader path that make the GUI capture usable instead of merely recorded. Catalog: --parse-gui-capture joins the read-back with the package offline, and --write folds it in. Each promoted entry carries the measured behaviours in document order with duplicates (57 of 76 repeat an element), the duration those timings belong to, and the measured scaling rule with its 1 ms limit. 71 of the 76 identifiers confirm what the catalog had; 5 motion paths fill an empty field. Writer: emits the measured behaviours verbatim, scaling animated durations and delays in proportion and leaving the visibility p:set at 1 ms with its delay recomputed as duration - 1. An effect whose duration is Auto refuses a numeric durationMs rather than ignoring it. Reader: matches the measured sequence exactly and inverts the scale to recover the duration. Without it the promotion produced 64 partial round-trips, because three p:animRot read as a mismatch against a distinct behaviorChildren list. accept.py: behaviorPayloads 71 -> 0, round-trip 248 of 248 equal, partialRoundTrip 0. Writer coverage 343 -> 458 generated. All 95 gallery tiles generated, none refused. The guide's authorable list goes from 24 to 101.
…no duration is authored Promoting the GUI capture removed observedChildDurationMs from every measured entry, and that field was the writer's fallback when a slide names no durationMs. The value is how far the effect advances the timeline, so an afterPrevious group's delay is the sum of what came before it: without it, a slide of click-then-after-previous wrote the second start group at delay 0 while its first effect ran 500 ms, and the reader refused the result as a timeline it could not express. The fallback is measuredDurationMs first - for a measured entry that is the duration PowerPoint itself applied - then observedChildDurationMs. Covered by a slide with one shape animated three times across two click groups and no durationMs anywhere. The existing round-trip slide could not catch it: every effect in it names an explicit duration, so the fallback never ran.
… and find the direction route assert_ready required PowerPoint to be frontmost. The document check is what guards the operator's deck, and every action is an AXPress or attribute write addressed to a named element, so it reaches an occluded window and takes no focus. Requiring frontmost cost a run of any length the operator's screen, and aborted it whenever another app came forward. The inverted test asserts a whole plan captures while Terminal is frontmost. Confirmed live by the probe that measured the next route: press the tile (which selects the effect - Effect Options is disabled until then), press Effect Options, and a window of that title opens carrying the directions the applied effect offers. Fly In publishes eight compass points plus the Sequence group. The labels are per effect, so the plan has to read them live rather than derive them from the catalog's 45 direction names.
|
Medium 7-14 are fixed in Four of the eight turned out to be one theme — the storyboard not knowing what the build knows — so they are fixed together. The storyboard group7 — it failed outright on a raw-preserved slide. Fixed as you suggested: all four motion keys are dropped in 8 — and said nothing about it. Frame 0 now carries one note per preserved fragment, including the reason the import recorded, so a storyboard of such a slide says "preserved as raw XML, cannot be shown here" rather than rendering as a still with empty 9 — the shared trigger state. Each trigger frame now starts from a copy of the settled main-sequence state. The two consequences you did not list were worth having as well: Initial visibility now counts interactive entrances too. That one was the most visible defect of the four: an element only a trigger reveals was drawn at frame 0 as though it were already there, which is exactly the thing the storyboard exists to catch. 10 — placeholder, include and override targets. Three parts:
The other four11 — lint before resolution. An unexpanded Your note that 12 — 13 — the dropped 14 — the text-mode manifest. Written as bytes now, with a test asserting no CRLF. Note that the copy your finding was about is gone for a different reason: H2 replaced the sidecar copy with a bundle-relative reference, so nothing copies a digested file with Verification
Five of the six Low items are next; the sixth (the "1.2 MB catalog" docstrings) landed with the housekeeping. |
…g Low findings Review by ShotaroKataoka, 2026-11-13. The sixth Low item — the "1.2 MB catalog" docstrings — landed with the housekeeping in `e4f4007e`. **A still deck was warned about motion it would not get.** `check_text_build` and `check_morph_pairing` ran unconditionally in `_resolve_config`, before the switches were resolved at the bottom of it. Both describe what the build will write, and neither writes anything with its switch off, so a deck built as a still was told about text builds and unpaired morph identities that were never going to reach the package. The switches are resolved before the two checks now and each is gated on its own: text builds on `animations`, Morph on `transitions`, because Morph is a transition. **The replay slot came from the bytes rather than the record.** `apply_raw_fragment` chose between `p:timing` and `p:transition` by scanning the replayed XML for a `p:transition` anywhere inside it. The manifest's `kind` is validated to be exactly one of the two, is the kind the import decided, and is covered by the sidecar's digest, so `_fragment_kind` reads that instead. For every fragment sdpm writes the two agree, which is why the new test builds one where they cannot: a sidecar recorded as `timing` carrying a `p:transition` descendant. On the old code that tree went into the transition slot and the slide's own timing stayed beside it — two `p:timing` children, which is the corruption python-pptx issue 954 describes. `_carries` has no other caller and is removed. **The media-only sidecar was replayed unverified.** `replay_raw_fragment` checked the digest only when it read the full sidecar. In tree that was covered because the builder validates the whole closure against a root first, but this function also accepts a manifest with no root, and then nothing verified the file it actually replayed. It now compares `mediaOnlySha256` for the media-only path, so the check follows whichever file was read. **`existing_deck` was dead in production.** It was passed only from tests, so the rule it exists for — preserve an explicit switch, derive only a missing one — never fired: converting again over a deck turned a switch the user had set to false back on, and the guide was the only thing keeping it. `pptx_to_json` now defaults `existing_deck` to the `deck.json` already in `output_dir`, because converting into a deck directory is a sync whether or not the caller says so. A fresh import bundle has no `deck.json` there, so nothing changes for one; an unreadable one falls back to the detected content rather than failing a sync. **An identity on a group child was inert in silence.** A group is flattened — its children become ordinary slide shapes at slide coordinates — but neither the builder's registration walk nor `_element_ids` descends into one, so an `id` or `morphId` there did nothing. Targeting it failed the build with "known element ids: none", which does not explain why an id the JSON visibly carries was not seen. `validate_slide_motion` now reports `inert-group-child-identity`, nested groups included, and names the fix: move the element out of the group, which changes no geometry. Reported rather than supported, deliberately. Registering group children means threading the identity registry through `_add_group` and deciding what a `morphId` means on a child of a group that is not a group in the output — a feature with its own design questions, where this is a one-line authoring mistake that now says so. Flagged for the reviewer in case they want the feature instead. Verified: `ruff` clean, 4830 passed / 18 skipped / 4 xfailed. Each of the six new tests was run against the previous implementation first and all six fail there. Two needed correcting to get that far: the slot test asserted `apply_raw_fragment`'s return value, which is the fragment root and the same either way, and the media-only test used `nest_media=True`, which makes the boundary unclassified so no media-only variant exists to tamper with. The three `test_description_budget` params, the order-dependent `test_svg_icon_is_inlined_with_prefixed_ids` and the wall-clock `test_timeout_note_names_a_slow_start[0.5]` fail on this machine and pass in CI on all three platforms; neither this branch nor this commit touches them.
|
The five remaining Low items are fixed in A still deck was warned about motion it would not get. Both checks ran before the switches were resolved at the bottom of The replay slot came from the bytes rather than the record. The media-only sidecar was replayed unverified. The digest check now follows whichever file was read, using
An identity on a group child is now reported, not supported. I stopped short of making it work, and I want to flag that as a judgement call rather than bury it. Registering group children means threading the identity registry through Verification
Where this leaves the PR
Plus One deviation from the review stands: |
|
Thank you for working through every item, and for the care in the replies. Running each new test against the previous implementation first made the fixes easy to trust. Your three judgement calls
Re-review of the fix commitsI re-reviewed High
Medium
Low
High 1 to 3 are new in the fixes. High 4 is the remainder of the original finding. |
…view findings Re-review by ShotaroKataoka, 2026-11-16, against `8092aca4`. Three of the four High findings are regressions the earlier fixes introduced, and each is a case of a test that passed for the wrong reason. **H1 — `effects()` could not be reached the way the guide said.** Removing `describe_effects` as a tool left the animations guide, the `describe` module docstring and the CHANGELOG documenting `from sdpm.engine.timing.describe import effects` inside `run_python`. That route never worked: `servers/local/sandbox.py` rejects every `ast.Import` / `ast.ImportFrom` at parse time, and the Cloud runner has no `sdpm` installed. The tests imported the function directly, which is the one thing an author cannot do — **a test that bypasses the documented route does not test the documented route**, and that is the lesson worth keeping from this. It is served by `read_guides` now: `read_guides(["effect:flyIn"])`, with `transition:` and `category:` routing the same way and anything unprefixed read as a guide name, so one call can take both. The server answers it, so Local and Cloud behave identically — which the sandbox route could not. It rides on `names` rather than taking a parameter of its own because a new schema property measures at about 150 characters of the per-turn tool budget and the surface has roughly 160 to spare; widening one description costs 65. Measured both ways before choosing. The new tests call the tool, assert the guide names that route, and assert the sandbox really does reject the old one. **H2 — the storyboard reported a trigger-revealed element as "never revealed".** Making each trigger frame independent left the end-of-build pass reading `slide_frames[-1]`, which is now a trigger's frame. With two triggers it reported everything the *other* trigger reveals as stranded. Frames carry `kind: "build" | "trigger"` and the pass reads the last build frame, by that field rather than by parsing the label. An element a trigger reveals is excluded as well: it has a reveal path, just not one on the clicker. Asking "visible in any frame?" instead would have been simpler and wrong — it would stop reporting the element hidden at the end of its own build, which is one of the three defects the storyboard exists to catch. The note also lands on the last build frame now rather than on whatever frame happened to be last. **H3 — the B314 fix still aborted the import on the input it was about.** `defusedxml` signals a refusal with `EntitiesForbidden` / `ExternalReferenceForbidden`, which derive from `ValueError`, not from `ParseError`. Verified directly: an entity declaration raises `EntitiesForbidden`, a malformed document raises `ParseError`, and only the second was caught — so the one input the safe parser was chosen for failed the whole conversion instead of recording nulls. `DefusedXmlException` is caught too, with a test that pins the premise so it cannot quietly stop testing anything. **H4 — the remainder of the original finding.** The measured path now compares each behaviour's duration and delay against the capture once the scale is known, inverting the writer's own rule (`_scaled`, with the visibility `p:set` keeping its measured duration and having its delay recomputed from the effect duration). Presence was all the first pass could check, so a *changed* delay still read as the catalogued preset. On the explicit-behaviour path the carrier is required to carry no attributes — the writer emits a bare `p:cBhvr`, so an `override="childStyle"` was being dropped — and `@fill` is no longer accepted on its `p:cTn`, since the writer emits none and the reader represents none. **M5 — the payload comparison depended on child order.** The writer appends `to, from, by, tavLst`, the ECMA-376 sequence for `p:animScale` is `by, from, to`, and PowerPoint writes `from, to`. So `entrance.curveUp` and `exit.curveDown` imported semantically from sdpm's own output and raw from a real file. Both sides key the value subtrees by element name and sort them; the four names are distinct, so nothing is weakened. **M6** A media node with no `p:stCondLst` is refused: the guard only ran when the list was present, so such a node imported semantically and was rebuilt with the builder's `delay="indefinite"`. **M7** `lint_and_sanitize` sees one slide and cannot resolve `override`, so an unresolved `override` now suspends the target-membership rule exactly as an unexpanded `include` does. The save path and the build path agree about an inherited target. **M8** And the build no longer inherits that suppression: it lints the resolved *and* include-expanded slide, so a misspelled target on a slide with any include is reported again. The suppression is for the standalone linter, which cannot read an include. **M9** `lint_motion` takes the slide numbers from the caller's own list, so the legacy `only_slugs` path no longer renumbers a filtered list into the same diagnostics list that `lint` numbered from the full deck. **M10** `_fragment_kind` refuses anything but `"timing"` / `"transition"` instead of letting `str(None)` fall into the transition branch. On the in-tree path `replay_raw_fragment` validates the manifest's shape first, so the guard covers the rootless, unvalidated case the review named — and the test exercises it at that seam rather than through `apply_raw_fragment`, which cannot reach it. **M11 — no test imported a PowerPoint-authored package.** Seven do now, from the GUI capture fixtures, asserting 23 effects still read as semantic JSON. They pass before this commit as well as after: the point is not to reproduce a bug but to pin the calibration, so that tightening a check past what PowerPoint writes shows up as effects moving from semantic to raw. Without them M4, M5 and M6 all passed the suite. **Low.** The mixed-`mc:AlternateContent` and `morphId` refusals name their slide, like every sibling error. `inert-group-child-identity` is dropped on the build path when both switches are off, matching the text-build and Morph checks gated in the previous commit; the save path keeps it, having no switch context. `_asset_name` is removed — nothing could reach it — while `SlideMotion.assets`, `add_asset` and the manifest's `assets` branch stay, with a comment saying why: bundles imported before the transition-sound change carry `assets` entries and validation has to keep reading them. The catalog is 3,054,404 bytes, which is 3.05 MB or 2.91 MiB; the docstrings said 2.9 MB, which was MiB labelled MB, and now say 3.0 MB. Verified: `ruff` clean, 4852 passed / 18 skipped / 4 xfailed. Each of the twelve new bug-reproducing tests was run against the previous implementation and all twelve fail there; the seven PowerPoint-package tests are calibration guards and pass on both. One of the twelve was rewritten after it passed on the old code for a reason I had not checked — `replay_raw_fragment` already validates the manifest's shape — so it now tests the seam that is actually exposed. The three `test_description_budget` params and the order-dependent `test_svg_icon_is_inlined_with_prefixed_ids` fail on this machine and pass in CI on all three platforms; neither this branch nor this commit touches them.
|
All fifteen are fixed in Three of the four High items were regressions my fixes introduced, and all three were tests that passed for the wrong reason. That is the part worth saying plainly before the details. The three I broke1 — It is served by It rides on The tests now call the tool, assert the guide names that route, and assert the sandbox really does reject the old one. 2 — the storyboard reported a trigger-revealed element as "never revealed". Exactly as you described; I reproduced it before touching anything. Frames carry I took neither of your two options as stated. "Visibility across all frames" is simpler and wrong: it would stop reporting the element hidden at the end of its own build, which is one of the three defects the storyboard exists to catch. So it is the settled main-sequence state plus excluding anything a trigger reveals — that element has a reveal path, just not one on the clicker. The note also lands on the last build frame now instead of whatever frame happened to be last. 3 — the B314 fix still aborted on the input it was about. Verified directly rather than taking it on trust: an entity declaration raises 4 — the remainder of the original findingThe measured path compares each behaviour's duration and delay against the capture once the scale is known, inverting the writer's own On the explicit-behaviour path the carrier must now carry no attributes — the writer emits a bare Medium5 Both sides key the value subtrees by element name and sort them. Your diagnosis was precise: the writer appends 6 A media node with no 7 An unresolved 8 And the build no longer inherits that suppression: it lints the resolved and include-expanded slide, so a misspelled target on a slide with an include is reported again. 9 10 11 Seven PowerPoint-authored packages from the GUI capture fixtures now import in the suite, asserting 23 effects still read as semantic JSON. These pass before this commit as well as after, and that is the point: they are not reproducing a bug, they are pinning the calibration, so a check tightened past what PowerPoint actually writes shows up as effects moving from semantic to raw. You were right that their absence is why 4, 5 and 6 passed the suite. The oracle LowAll four. The two refusals name their slide. On the dead asset path I split it rather than doing one or the other: And the size: 3,054,404 bytes is 3.05 MB or 2.91 MiB. I had written MiB and labelled it MB. The docstrings say 3.0 MB. Verification
|
|
Thank you for I re-reviewed Two design decisions
High
Medium
Low
High 1 and Medium 4–7 are new in this commit. High 2 and Medium 3 are what remains of last round's High 4 and High 2. |
…ling exactly Third review by ShotaroKataoka, 2026-11-17, against `47efc9b9`. Both High findings are in the measured-timing check the previous round added, and both are mine. **H1 — the check sent decks sdpm itself had just written to raw.** Eight gallery presets at some durations: `entrance.drop` at 300, 700 and 1234, `entrance.bounce`, `entrance.centerRevolve`, `exit.bounce`, `exit.centerRevolve` and `emphasis.teeter` at 1234. The ratio was recovered from one behaviour's written `@dur`. `_scaled` had already rounded that number, so `written / source` sits within half a millisecond of the writer's fraction without equalling it, and `measuredDurationMs` times it lands one off: a 300 ms `entrance.drop` came back as 301, and every later comparison then missed by a millisecond. Two changes. The ratio is rebuilt as `Fraction(duration, measuredDurationMs)`, which is the fraction `_duration_scale` hands the writer. And the duration itself is recovered by intersecting what each written value allows — `_scaled` is `floor(source × D / M + ½)`, so a written `w` means `(w − ½) × M / source ≤ D < (w + ½) × M / source`, and the intersection over every scaled value is exactly the set of durations at which all of them round-trip. Fixing only the ratio left all eight still raw, because the recovered *duration* was itself wrong. The estimate is kept whenever it lands inside the intersection — it is then provably right, and that is the common case. Taking the lowest integer unconditionally turned `colorPulse` and `shimmer` from 500 ms effects into 499 ms ones: one distinct timing constrains the duration only loosely, and the catalogue round-trip caught it. A millisecond of slack is allowed in the comparison, and only where `_scaled`'s own docstring records that PowerPoint and this writer may legitimately differ: an exact half, which PowerPoint's float precision splits both ways. Blanket ±1 would let a deliberately changed delay through. **H2 — a missing or non-numeric timing imported as the catalogued preset.** The comparison skipped any written value that was not a run of digits, so `dur="indefinite"`, a deleted `@dur` and a deleted `@delay` all read back as the preset and the next build wrote the catalogue's number over a file that said the effect never ends. A recorded timing the file does not carry as an integer is refused now. Refusing inside the comparison was not enough, which is worth recording: the scaled behaviour's `@dur` is also where the duration is recovered from, so a non-numeric value there left the scale unrecoverable and the comparison was skipped altogether. `p:animEffect/@Dur="indefinite"` still imported semantically after the first attempt. Reading the recorded timings is now one pass that runs before the duration is known, refuses non-integers, and feeds both the recovery and the comparison. Tests. The duration sweep covers all 97 scalable measured presets at four durations rather than the eight that tripped: which preset breaks depends on one behaviour's rounding disagreeing with another's, and any single case would have passed before the fix too. Three of the four durations fail on `47efc9b9`; 3000 ms trips nothing and is kept as a guard, which the docstring says. The non-integer tests cover all three recorded locations — the scaled `p:animEffect` and the visibility `p:set`'s two timings take different branches — and all six fail on `47efc9b9`.
…um and Low findings Third review by ShotaroKataoka, 2026-11-17, against `47efc9b9`. The six Medium and seven Low findings; the two High are in `e9ba4b57`. **M3 — a trigger that reveals then hides still read as "never revealed".** The stranded-element pass excluded an element a trigger reveals by reading the trigger frame's end state, and a trigger entrance carrying `afterEffect: hide` reveals its target and hides it again within the same click. It is read off the trigger's effects now, which is the same set that decides what starts off screen at frame 0 — so the two are derived in one place rather than two. **M4 — the names the routing table lists were not the names it accepted.** The table qualifies a name whenever the bare one is ambiguous, so it lists `entrance.bounce` and `motionPath.bounce`; the lookup compared the whole string against the bare tail, which made the listed form the one that returned nothing while the ambiguous `bounce` returned all three. A qualified name is split into its category now. The test is generated from the table itself, so it covers names nobody wrote down. **M5** The no-argument `next` and the unmatched-name hint named `effects()`, which is not reachable through `read_guides`. Both name the `read_guides([...])` form, and the hint also names the qualified form. The CHANGELOG said "no arguments returns the routing table"; a bare `effect:` is that form, and it now works (M7). **M6 — the CLI subcommand did not match the tool it is named after.** `read_guides` the subcommand read the guide directory itself, so `read_guides effect:flyIn` reported a missing guide file while `read_guides(["effect:flyIn"])` answered it — and SKILL.md promises workflow text that calls a tool applies verbatim to the CLI. It goes through `tools.read_guides`, prints descriptions and lists the prefixes. **M7 — one bad name failed the whole call.** `read_docs` raises on the first name it cannot find, so a single typo returned nothing for the names that were right; an unknown prefix (`effects:flyIn`) and a bare `effect:` both fell through to it. Names are read one at a time into an `errors` map, a bare prefix is the no-argument form, and an unknown prefix says which three exist. The `except (KeyError, ValueError)` the review called unreachable is gone: `effects` reports an unknown name as a hint and raises neither — checked, not assumed. **M8 — the tightened checks had no tests.** Four now. The measured preset at a non-measured duration is in `e9ba4b57`. The reordered payload (M5 last round) asserts schema-order children import as the *same* JSON as writer-order ones. The build-time include is the case `test_motion_is_validated_after_overrides_resolve` did not cover: it tests `override`, and the suppression has two triggers. The `only_slugs` numbering test had to go through `presentation.json` — a deck directory filters at assembly, so the renumbering the review found is only reachable on the legacy path, which is worth knowing. All four fail at `8092aca4`. **Low** `inert-group-child-identity` is gated per key: `id` on animations, `morphId` on transitions. Done where the rule is produced rather than by filtering after, which is the shape the sibling text-build and Morph checks already have. `category:` now says what it costs — about 17,700 characters against 1,300 for one effect — next to the 140-token claim it was undercutting. The guide also says when a target is checked: a slide with an `include` or an `override` carries no element list of its own, so that one diagnostic waits for the build. 3,054,404 bytes is 3.1 MB at one decimal, in three writer docstrings and one test. The suspension reasons in `validate_slide_motion` are gone, not surfaced: every return there is a finding and there is no informational channel, so the strings had nowhere to go. Why the suspension exists stays as a comment. The media refusal read "start condition is absent is not the builder's single delay='indefinite'" — it interpolated an empty list into a sentence. The absent case has its own clause, and the test pins the wording, because a raw fallback reason is the only account of why a deck went raw. Includes are still expanded twice, and the second pass is deliberate: one copy for both would put expanded elements into `BuildConfig.slides`, which the layout-balance check and the per-slide summary also read. The file read is cached instead, keyed on mtime and size so an edited file is a different key, and each caller gets its own copy because the first was free to edit what it got back.
|
All fifteen are fixed, in High1 — the measured-timing check sent decks sdpm itself had just written to raw. Reproduced: You named the cause exactly. The ratio was recovered from one behaviour's written Worth recording that fixing the ratio alone was not enough. The ratio is rebuilt as So the duration is recovered by intersecting what each written value allows. One thing I got wrong on the first attempt, which the catalogue round-trip caught: taking the intersection's lowest integer unconditionally turned The comparison allows one millisecond of slack, and only where Two more presets import semantically as a result: 251 against 249, with 2 — a missing or non-numeric timing imported as the catalogued preset. Fixed; a recorded timing the file does not carry as an integer is refused. Refusing inside the comparison was not sufficient, and this is the part worth your attention: the scaled behaviour's Medium3 Derived from the trigger's reveal effects, as you suggested. That is the same set that decides what starts off screen at frame 0, so the two are now derived in one place instead of two. 4 A qualified 5 Both hints name the 6 7 Names are read one at a time into an You were right that the 8 Four tests, each verified to fail on the commit that preceded its fix. The And you were right that LowAll seven.
3.1 MB in three writer docstrings and one test. The suspension reasons are dropped rather than surfaced: every return from The media refusal's absent case has its own clause, and the test pins the wording — a raw fallback reason is the only account a reader gets of why a deck went raw. On the double expansion: the second pass is deliberate and I kept it. One expanded copy for both would put expanded elements into The pattern in these three roundsEach round, the High findings have been regressions my own fixes introduced, and each one was a test passing for the wrong reason. Round two: a test that bypassed the documented route. Round three: a test that exercised the measured path only at the duration it was measured at. So the new tests are swept rather than sampled — all 97 scalable presets at four durations, every qualified name the table generates, all three recorded timing locations — and I verified each one fails on the previous implementation before committing. Three of the four durations and all six timing locations do; the cases that do not are marked as guards in their docstrings rather than left looking like reproductions. |
ShotaroKataoka
left a comment
There was a problem hiding this comment.
Thank you for e9ba4b57 and 0983d1b7, and for writing up the two places where the first attempt was not enough: the recovered duration being off by one after the ratio was fixed, and the non-numeric @dur that skipped the comparison. Sweeping the tests and checking that each one fails on the previous implementation is what made this round easy to verify.
I re-reviewed 47efc9b9..0983d1b7 with two independent reviewers, as before. All fifteen round-3 findings are closed. No High or Medium items remain, so I'm approving. The Low items below are new in this range, and the first one is worth the one-line fix before merge. References are against 0983d1b7.
Low
- The half-rounding slack also accepts the value neither writer produces.
_check_measured_timingsallowsabs(written - expected) <= 1on an exact half (reader.py:2294-2295)._scaledrounds a half up (writer.py:706-721), soexpectedis already the upper rounding, and the two values PowerPoint or this writer can produce areexpected - 1andexpected.expected + 1is neither, but it passes. Example:entrance.bounceat 300 ms,p:animScale@delaychanged from 98 to 99 (650 × 300/2000 = 97.5), imports asentrance.bouncewithdurationMs: 300and no raw sidecar, and the next build writes 98.entrance.drop@875(@dur137 → 138) andexit.boomerang@201(@delay101 → 102) behave the same way. Changing every scaled timing by ±1 and ±2 at 200–2000 ms, about 17,700 of 3.78 million edited files import semantically with a value that is neither rounding of the product. Most are +1; the ±2 cases happen when the edit moves the recovered duration by 1 ms and the slack covers the rest. The loss is at most a millisecond or two, and only on a hand edit, which is why this is Low. It does contradict the reply's "blanket ±1 would let a deliberately changed delay through", though. Accepting only the two roundings (written in (expected - 1, expected)on a half,written == expectedotherwise) fixes it, and a package test that changes the Bounce delay from 98 to 99 and expects raw would pin it. - The "Related guides" heading is gone. The new
### When a target is checkedsection replaced## Related guidesinstead of going above it (animations.md:986). The fourread_guides([...])bullets at:997-1004now read as part of the validation subsection. Restoring## Related guidesabove:997fixes it. - The invalid-include error now names the absolute path.
_include_elementsraisesInvalid JSON in include file {path}with the resolved path (builder/__init__.py:672). At47efc9b9it named the deck-relativesrc. On the Remote server that is the materialised tmpdir, which means nothing to the agent reading the error. Catching at the call inexpand_includesand namingsrcwould restore the old message.
The include double expansion
Your rationale holds. One expanded copy shared by _resolve_config and PPTXBuilder would put expanded elements into BuildConfig.slides and change what the layout-balance check and the per-slide summary read. Avoiding that without a second pass means carrying a second list through BuildConfig, which is more than this point is worth. The cache is correct as written: the key is (path, (st_mtime_ns, st_size)), errors are not cached, each caller gets a deep copy, the size is bounded at 256 for the long-lived servers, and on the Remote server every request gets a fresh tmpdir, so entries cannot cross decks. One limit should be known rather than fixed: a rewrite of an include that keeps the same size within the filesystem's timestamp granularity returns the old content until the process restarts. That only happens with 1-second timestamps (HFS+, FAT, some network filesystems); APFS and ext4 store nanoseconds. Either the cached read or a plain second read is fine with me.
Round-3 findings
| # | Finding | Verdict | How it was checked |
|---|---|---|---|
| 1 | Measured-timing check sends generated decks raw | closed | All 97 proportional presets plus every non-default measured option (190 variants) at 30 durations, each read back and rebuilt: 5,700 semantic, 0 raw, 0 XML drift (47efc9b9: 219 raw, 6 drift). colorPulse / shimmer stay 500 ms. At odd durations they read back 1 ms high, but the XML at D and D+1 is byte-identical and 47efc9b9 does the same, so nothing is lost. |
| 2 | Missing or non-numeric timings import as the preset | closed | Five presets at three durations, every @dur / @delay set to indefinite, deleted, empty, -1, 1e3, +500, " 500": 882 of 882 refused (47efc9b9: 665 imported as the preset). Includes p:animEffect/@dur="indefinite". _measured_timings (reader.py:1086-1132) runs before duration recovery. |
| 3 | Reveal-then-hide inside a trigger is "never revealed" | closed | afterEffect: hide on a trigger entrance, and an entrance plus an exit in one trigger, no longer print "never revealed"; an element hidden by its own build's afterEffect: hide is still reported. One derivation for frame 0 and by_trigger (storyboard.py:282-302, :645). |
| 4 | Qualified effect names cannot be looked up | closed | effect:entrance.bounce, exit.bounce and motionPath.bounce return one effect each, bare bounce returns three, and every name in the routing table resolves (describe.py:232-237). |
| 5 | Hints point at effects() |
closed | Both the routing table's next and the unmatched hint name read_guides([...]) (describe.py:393-406); the CHANGELOG's bare effect: line is now true. |
| 6 | CLI does not route the prefixes | closed | read_guides effect:flyIn, effect:entrance.bounce, effect: and category:emphasis work from the CLI; the bare listing names the prefixes (pptx_builder.py:442-468). |
| 7 | One bad entry fails the whole call | closed | ["effects:flyIn", "effect:flyIn", "animations"] returns both good entries plus a per-name error naming the three prefixes; the dead except is gone (tools/__init__.py:286-335). |
| 8 | Tightened checks have no tests | closed | With the new tests applied to 47efc9b9, 21 of 31 fail, and the ones that pass are those marked as guards. The schema-order payload, include-target and only_slugs tests pass on 47efc9b9 because those fixes were already there; we did not run them against 8092aca4. |
| 9 | inert-group-child-identity gated on both switches |
closed | Each key is gated on its own switch (api.py:964-972, model.py:256); both parametrised cases fail on 47efc9b9. |
| 10 | category: cost unstated |
closed | animations.md:467-469; measured 17,662 and 1,311 characters. |
| 11 | override target checked only at build |
closed | Table note at animations.md:977 and the new section at :986-995 (see the heading item above). |
| 12 | 3.0 MB | closed | 3.1 MB in writer.py:377, 559, 967 and test_animation_writer.py:3235; no 3.0 MB left. |
| 13 | Unused suspension reasons | closed | A boolean, with the reason in a comment (model.py:301-312). |
| 14 | "is absent is not" wording | closed | Separate clause for the absent case (reader.py:1390-1396), pinned by a test that fails on 47efc9b9. |
| 15 | Includes expanded twice | closed (kept by design, read cached) | See the section above. Cache tests at tests/test_checks_includes.py:81-132 pass. |
make lint is clean. make test has two local failures outside the range: the PowerPoint-only catalog check, which also fails on 47efc9b9, and an HTML icon test that passes on its own.
Thanks again for the careful turnaround. Approving, with the slack fix as the one thing I'd still like to see go in.
…ndings of a half Approval review by ShotaroKataoka, 2026-11-18, against `0983d1b7`. Three new Low findings; the first is a real defect and it contradicts what I wrote in the reply. **The half slack accepted a value neither writer produces.** I argued that a blanket ±1 would let a changed delay through, and then allowed exactly that on a half: `abs(written - expected) <= 1`. `_scaled` rounds a half up, so `expected` is already the upper rounding and the only other value a writer can emit is `expected - 1`. The two legitimate values are not symmetric around `expected`, and `expected + 1` passed. Reproduced on all three cases the review names: `entrance.bounce` at 300 ms with `@delay` hand-edited from 98 to 99 (650 × 300/2000 = 97.5) imported as `entrance.bounce` at 300 ms with no raw sidecar, and the next build wrote 98 back over the edit. Same for `entrance.drop@875` and `exit.boomerang@201`. The comparison now lists the values a writer can produce — `(expected - 1, expected)` on a half, `(expected,)` otherwise — and the refusal message names both. The lower rounding still imports, which is the case the slack exists for: PowerPoint's float precision splits an exact half both ways. Two tests. The three named cases, as the review asked. And a sweep of every exact half the catalogue produces — 64 locations across 97 presets at three durations, of which 27 imported semantically before this commit. Which timing lands on a half depends on the ratio, so these cannot be enumerated by hand; that is the same reason the duration sweep covers the whole catalogue, and it is why the three named cases alone would have been the weaker test. **The "Related guides" heading was gone.** My `### When a target is checked` section replaced `## Related guides` rather than going above it, so the four `read_guides([...])` bullets read as part of the validation subsection. Restored. **The invalid-include error named the resolved path.** Caching the read moved the message into the cached function, where only the absolute path is in scope — and on the Remote server that is a materialised tmpdir, which tells the agent reading the error nothing. Raised at the call site again, naming the deck-relative `src`. A test pins that the resolved path does not appear, and another pins that a read error is still not cached, so fixing the file and rebuilding works without a restart. On the cache's one real limit, which the review asked to have known rather than worked around: a rewrite that keeps the same size within the filesystem's timestamp granularity is the same key and returns the old content until the process restarts. That needs one-second timestamps — HFS+, FAT, some network filesystems — while APFS and ext4 store nanoseconds. Recorded in the docstring.
|
Thank you for the approval, and for catching the slack. All three Low items are in The slackYou were right, and it contradicts what I wrote in my last reply. I argued a blanket ±1 would let a changed delay through, and then allowed exactly that on a half. All three of your cases reproduce: The comparison now lists the values a writer can produce — Two tests rather than one. The three named cases, as you asked. Plus a sweep of every exact half the catalogue produces: 64 locations across 97 presets at three durations, 27 of which imported semantically before the fix. Which timing lands on a half depends on the ratio, so the cases cannot be enumerated by hand — and the three named ones alone would have been the weaker test, for the same reason the duration sweep covers the whole catalogue rather than the eight presets that tripped. That is now three rounds where sampling was the thing that hid the defect, so the sweep is the form I am defaulting to. The headingRestored above the four The include errorRaised at the call site again, naming the deck-relative The cache limitRecorded in the docstring rather than worked around, as you suggested — a rewrite keeping the same size within the filesystem's timestamp granularity returns the old content until the process restarts, which needs one-second timestamps (HFS+, FAT, some network filesystems) rather than APFS or ext4. Thank you also for checking the cache properties I had not stated: errors uncached, deep copy per caller, bounded size, fresh tmpdir per Remote request. On your round-3 verificationYour note that the schema-order, include-target and One thing to flagThe branch is 7 commits behind |
|
🤖 KiroCrew automated comment
|
|
🤖 KiroCrew automated comment
|
A sidecar's XML was checked for DTDs by searching the raw bytes for <!DOCTYPE / <!ENTITY, then parsed a second time in remap_fragment with lxml's default parser. Both halves were weak: the byte search looks for UTF-8 spellings, so the same document that was refused as UTF-8 passed as UTF-16 (measured), and the default parser names none of resolve_entities=False / load_dtd=False / no_network=True, which on lxml < 5 resolves external entities. - validate_xml_resource_limits now rejects any document whose docinfo.doctype is set, after the hardened parse, whatever the encoding. The byte search stays as a fast path: it carries the precise diagnostic and is the only thing that catches a bare <!ENTITY with no DOCTYPE around it, which is not well-formed and would otherwise come back as a syntax error. - validate_xml_resource_limits and enforce_xml_limits return the parsed root, and remap_fragment uses it instead of calling etree.fromstring on the same bytes. - lxml>=5 in sdpm/pyproject.toml. - tests/test_animation_security.py covers a UTF-16 and a UTF-32 DOCTYPE, both of which pass the byte search, and that the limits check hands back the tree it parsed. Addresses the maintainer follow-up on #595.
The entry was written into [Unreleased]. A later merge from main renamed that heading to [0.16.0] - 2026-11-12 with the branch's 45 lines still inside it, so the CHANGELOG claimed object animations and slide transitions had shipped in 0.16.0. They have not shipped at all. The block moves back under [Unreleased] with its own Added heading. Nothing of main's 0.16.0 content changes: the diff against the merge base removes no line.
XML hardening applied, with one deviation — plus the description item from the earlier noteHead is now The follow-up finding (2026-11-21)All four suggestions are in
I reproduced the bypass before fixing it, so the test is written against a measured failure Deviation: the byte search stays, next to the new check, rather than being replaced by Interface change, since it is not local to one file. A note on the test's parametrisation: UTF-16 and UTF-32 there are the BOM-carrying The description item from 2026-11-19Rewritten against the current head:
One more thing I found while in there
Still outstandingThe branch is 37 commits behind main and |
|
🤖 KiroCrew automated comment
|
| Item | State | Evidence |
|---|---|---|
| 1. UTF-16 / UTF-32 DOCTYPE passes the byte search | ✅ fixed | sdpm/sdpm/engine/timing/model.py:436 rejects on docinfo.doctype after a hardened parse (:431). Probe: UTF-16 DOCTYPE + SYSTEM entity, UTF-32 DOCTYPE, lower-case <!doctype, UTF-7 declaration all refused with TimingXmlLimitError; plain UTF-8/UTF-16 documents still parse. |
2. raw.py re-parsed with lxml's default parser |
✅ fixed | sdpm/sdpm/engine/timing/raw.py:499 uses the tree enforce_xml_limits returns. |
3. lxml had no lower bound |
✅ fixed | sdpm/pyproject.toml:8 lxml>=5; uv.lock requires-dist follows; uv lock --check passes. |
| 4. Test with a wide-encoded DOCTYPE | ✅ fixed | tests/test_animation_security.py: with the new test file on 92e62ef, 3 tests fail ([utf-16], [utf-32], hands_back_the_tree); on db684716 all 21 pass. |
5. PR description contradicts itself (describe_effects, 20 → 21, counts) |
✅ fixed | Summary now says the tool count stays 20; 149 files matches GitHub. Tiny nit: GitHub shows +282,282, the body says +282,279 (likely the db684716 CHANGELOG move). |
6. Branch behind main |
❌ not fixed | Now 37 commits behind and CONFLICTING. git merge-tree against c43f773 conflicts in 7 files: CHANGELOG.md, sdpm/sdpm/api.py, engine/builder/__init__.py, engine/checks/__init__.py, engine/schema/deck_spec.py, tools/__init__.py, servers/remote/server.py. Holding until #711 is fine; CI must then run on the merged head. |
The CHANGELOG fix in db684716 checks out: the block is back under [Unreleased], and git diff ff15727 -- CHANGELOG.md removes no line.
The deviation (byte search kept next to docinfo)
Agreed; it is safe. The byte search only adds refusals, never removes one, and docinfo.doctype is still the guarantee for every encoding. Keeping it gives a clearer message for a bare <!ENTITY ...> in UTF-8. A bare <!ENTITY in UTF-16 is still refused, as a syntax error from the hardened parse, which is fine. Its only cost is a false refusal for <!ENTITY inside a comment or CDATA, which sdpm's own sidecars never contain.
Optional nit: model.py:429 calls xml_bytes.upper() twice, copying the document twice. One upper = xml_bytes.upper() is enough.
Context size (not a blocker; worth a look during the merge)
Measured with main's scripts/context_size.py (tiktoken o200k_base), merge base ff157278 vs db684716:
| Loaded | Δ tokens |
|---|---|
| Tool definitions, every session (Local) | +105 (generate_pptx +79, read_guides +26) |
| Orchestrator at start (Local) | +389 |
| Composer-pptx at start (Local) | +372 |
animations.md / animation-craft.md |
13,578 / 4,046, on demand only |
The two new guides are never always-loaded. Only read_guides(["animations"]) reaches them, and the composer reads it only when a motion switch is on. Good.
Since #683, the whole Local tool surface on main is 2,669 tokens, so +105 is about +4% for every client and every session. Two ideas: drop animation_mode / transition_mode from generate_pptx (sdpm/sdpm/tools/__init__.py:159-160), since deck.json already has both switches. Or merge them into one parameter. The new orchestrator paragraph (sdpm/references/workflows/orchestrator.md, 14 lines) could be about half as long. It should keep three rules: off by default, set before dispatching composers, and a deck must read correctly with motion off.
Morph / #724 (note, not a blocker)
The maintainer moved #724 (slide transitions, starting with Morph) into this PR today. The PR body does not link it yet. A Refs #724 (or Closes #724, once the transitions part covers its Ken Burns and cut-away cases) would keep the two together.
Local checks on db684716 (Python 3.13)
make lint: passuv run pytest tests/: 4,906 passed, 31 skipped, 3 xfailed, 0 failed. The 4 failures you described did not happen here.make smoke: pass (20 tools, 2 templates)tests/test_animation_security.py: 21 passed
KiroCrew does not approve or merge; a maintainer decides.
|
Parking this as a draft. Not a review request for now. The plan is to split it rather than land it as one 149-file PR, and the author wants the whole animation area paused while other work goes first. #646 — the I will mark it ready again when the split is done. Nothing here needs attention in the meantime. |
Summary
Object animations and slide transitions, opt-in per deck, with the import side closing the
loop: a GUI-edited deck round-trips instead of losing its motion.
A slide JSON file can carry
transition(how that slide enters, including Morph by object /word / character) and
animations(a main sequence plus one interactive sequence per triggershape).
deck.jsoncarries the two independent switchesanimations.enabledandtransitions.enabled. Both default to off, an absent switch is off, and a deck writtenbefore this builds byte-identically — the regression gate below is what holds that.
What came with it:
read_guides, not a tool of their own:read_guides(["effect:flyIn"])answers what a gallery animation actually does, measuredfrom PowerPoint rather than guessed. A bare
effect:returns the routing table (whicheffects move, resize, recolour, rotate, fade, wipe or follow a path); an effect name returns
every behaviour it writes with keyframes and durations; a transition name returns the
parameterssets it accepts;category:emphasisreturns a gallery. A name the routingtable shows qualified is asked for that way (
effect:entrance.bounce, a different effectfrom
motionPath.bounce). The MCP tool count stays 20, which is whatAGENTS.mdandboth getting-started pages say. It was briefly a 21st tool,
describe_effects; a tool'sdescription is sent on every turn of every conversation, including decks that carry no
animation, so it came off the tool surface. "Catching up to main" below records both steps.
storyboard()(CLI:storyboard <deck>) renders one still frame per click. Theordinary preview draws every element where it is authored, which is exactly why it cannot
show build order: an element revealed too early, never revealed, or hidden at the end of
its own build all look correct in it. Each frame carries notes for what a still cannot show.
read_guides(["animations"])is the authoring contract and is loaded onlywhen a switch is on or a slide already carries those fields, so still decks pay no context
for it.
read_guides(["animation-craft"])is how much to move and when, as recommendationsrather than rules, split by who controls the pace —
presenterandcinematic.and 12 exit effects, media play, all 53 transition effects and all three Morph variants
generate today. Effect directions, emphasis and motion-path galleries, after-animation
effects, sounds and four timing options are preserved on import but refused at generation
by their catalog key rather than approximated.
Reading the diff
149 files, +282,279 / -75, counted against the merge base
ff157278— the same numbersGitHub shows. Most of it is not meant to be read line by line:
scripts/animation_catalog/)Buckets are by path: everything under
scripts/animation_catalog/is a capture script,tests/fixtures/andpowerpoint-animation-catalog.jsonare the generated row, the rest oftests/is test code, remaining.mdfiles are docs, and everything else is engine andservers.
The last row is machine output, kept because it is the evidence: the catalog
(
powerpoint-animation-catalog.json) is whatdescribe_effectsanswers from and what thegenerator refuses unsupported keys by, and the fixtures under
tests/fixtures/animations/are what the round-trip asserts against. Reviewing them byeye is not the intent;
tests/test_animation_catalog.pyis.Start with
sdpm/sdpm/engine/timing/(reader.pyandwriter.pyare the two halves),then
sdpm/references/guides/animations.mdfor the contract they implement.The regression gate: every invertible animation and transition field written is read
back and compared. 469 of 469 equal,
failed checks: []. A field that cannot survive thefile format is reported rather than silently dropped — the text-build check added here is
one of those reports.
Checklist
make allpasses (ruff + pytest) — 4,906 passed; see Testing for the four failuresthat are not this branch
ash scan --mode local --fail-on-findings— 8 findings → 2, and the 2 are not thisbranch; see Testing
CHANGELOG.md[Unreleased]updated for user-facing changesTesting
make lintclean.make smokeclean.pytest tests/on38e8ce6e: 4,906 passed, 27 skipped, 3 xfailed, 4 failed. The same four fail on92e62efdwith the hardening commit stashed, so they are not it.Every CI check on this PR passes —
python,scan,e2e,browser,unixon Linux andmacOS,
windows, the fourrelease-channeljobs and CodeQL. The one red check is "Bloglabel (contributors: ignore this if it fails)", whose name says what to do with it.
Correction to what this section used to say. It claimed every remaining failure
reproduces on
main. For the description budget that was wrong and the review was right:the failure CI reported was the total (
_TOTAL_MAX), at 17,140 against a 16,000 ceiling,with
describe_effectscontributing 1,300. It is no longer a tool — the effect descriptionsare reached through
read_guides— so the total is back under the ceiling, and CI confirmsit rather than arithmetic. bandit B314 is fixed with
defusedxml.ElementTree.The four failures that remain fail only on this machine. They pass in CI on Linux,
macOS and Windows, from byte-identical source with a lockfile-exact venv:
test_description_budget[local|acp|remote]— herestart_composingmeasures 581 againsta 560 cap, and
run_python717 against 700 on the remote server. That docstring is 581characters on
origin/maintoo and the caps are main's, so whatever makes CI measure lessis in my environment, not in the diff. I could not account for it and did not want to
report it as resolved; CI is the authority.
test_html_assemble.py::test_svg_icon_is_inlined_with_prefixed_ids— passes alone, failswhen
test_assets_not_installed.pyruns first. An order-dependent leak that only showswhere the AWS icon pack is installed locally. This branch touches neither test, nor
knowledge/assets/, norengine/html/.test_html_browser_check.py::test_timeout_note_names_a_slow_start[0.5]also fails hereintermittently: the test sleeps 0.5 s and asserts the note names "0.5 s", and this machine
sometimes measures 0.6. Both the test and
engine/html/browser_check.pyare byte-identicalto
origin/main.ASH went from 8 actionable findings to 2. Six were detect-secrets reading the animation
catalog's provenance block: the git commit ids of the two external references read while
deriving the catalog, and a sha256 of the fixture corpus the facts were checked against.
Those are published on purpose — the attribution is meant to be checkable, and
test_catalog_provenance_names_every_external_reference_without_vendoringasserts them, soa silently changed provenance block fails. Suppressed in
.ash.yamlwith a reason and anexpiry, following the precedent already there for the reveal.js CSP hash.
The remaining 2 are the
zod < 4.6.6advisory (GHSA-mrhx-c7xc-m3w5) and its transitive via@shadcn/ui, innode_modules. This branch changes nopackage.json, lockfile orpyproject.toml, and GitHub reports the same two highs on the default branch — Dependabot's,not this PR's.
Beyond the suite, the measured facts the implementation rests on were taken from PowerPoint
rather than assumed: PowerPoint has no bézier easing (
acceleration/decelerationareduration fractions, and Smooth Start/End record 0.5); there is no overshoot or spring, so
anticipation has to be one multi-segment motion path rather than two chained effects; a
motion path is slide fractions relative to the authored position. Four sample decks were
built and inspected frame by frame through
storyboard().Catching up to main
This branch left main on 2026-10-30. Main moved 162 commits to v0.14.0, and 31 more after
it, so there are two merges.
The second merge had two conflicts, both the same function grown on each side:
BuildConfiggained this branch's two motion switches and main'stitle/language, andPPTXBuilder.savegained main's two keyword arguments beside this branch's transition andtiming writers. Both sides are kept in both files; that commit message records the detail.
It had to come first rather than last, which is worth recording: while a PR is
CONFLICTING, GitHub cannot build the merge ref, so nopull_requestworkflow runs atall. The fixes before it were only confirmed by arithmetic until the merge landed.
The v0.14.0 merge
Seven files conflicted and three conflicted on substance;
the merge commit message records each resolution and why. Seven files conflicted and three conflicted on substance; the merge
commit message records each resolution and why. The three worth knowing about here:
deck.jsonno longer carries the two switches. They were being written intoevery new workspace, which broke
test_api_init_pptx_deck_json_is_byte_identical—main's deliberate contract that a new PPTX
deck.jsonholds exactly the four skeletonkeys, the same rule
outputFormatfollows. Nothing is lost: an absent switch alreadyreads as off, so a deck opts in by adding the switch itself.
describe_effectswas bound on the local server only, which main's newtest_both_servers_expose_the_tool_contract_and_nothing_elsecaught. It is no longer atool at all: its description and schema cost 1,300 characters of the per-turn budget for
a lookup a composer makes rarely, so the logic moved to
sdpm.engine.timing.describe.effects(). It was documented as reached throughrun_pythonat that merge, and the re-review found that route never worked —
servers/local/sandbox.pyrejects every import at parse time and the Cloud runner has nosdpminstalled, while the tests imported the function directly and so passed withoutexercising it. It now rides on
read_guides(read_guides(["effect:flyIn"]), withtransition:andcategory:routing the same way, and the same prefixes from the CLI), onnamesrather than a parameter of its own because a new schema property measures about 150characters of the per-turn tool budget against 65 for widening one description. The MCP tool
count is 20 again, which is what
AGENTS.mdand both getting-started pages already say.claude_plugin_installedkept the injectableprobeform rather than main'sself-contained one, because
_probealready carries the same timeout and error handling,so the behaviour is identical and the seam keeps the test off the machine.
XML hardening of the animation sidecars
The maintainer follow-up on 2026-11-21 found a defense-in-depth gap in code this PR adds:
a sidecar's XML was checked for DTDs by searching the raw bytes, and then parsed a second
time with lxml's default parser. All four suggested fixes are in
38e8ce6e, with onedeviation.
by it. The suggestion was to reject on
docinfo.doctypeinstead of the byte search, andthat check is now there and is the guarantee — but the byte search is the only thing that
catches a bare
<!ENTITY payload "x">with no DOCTYPE around it. That document is notwell-formed, so without the byte search it comes back as an XML syntax error rather than
as the refusal the existing test asserts. It also carries the precise diagnostic. The
docstring at
model.py:410says why both are there.validate_xml_resource_limitsandenforce_xml_limitsnow return the parsed root(
-> Nonebefore), andremap_fragmentuses it instead of callingetree.fromstringonthe same bytes. This is an interface change on two internal functions; of the nine call
sites only
raw.py:496reads the value, and the rest are unaffected by a wider returntype.
lxml>=5insdpm/pyproject.toml, with the reason in the comment, and the lockfile'srequires-distline follows.tests/test_animation_security.py: a UTF-16 and a UTF-32 document carrying aDOCTYPE, each asserting first that the byte search cannot see it, and one that the limits
check hands back the tree it parsed. Both UTF-16 and UTF-32 here are the BOM-carrying
spellings, because those are the wide encodings lxml detects from the bytes alone; a
BOM-less
utf-16-ledocument is refused too, but by the parser as "Document is empty".A merge artifact in the CHANGELOG
Worth flagging because it was invisible from the diff: this branch's entry was written into
[Unreleased], and a later merge from main renamed that heading to[0.16.0] - 2026-11-12with the branch's 45 lines still inside it. The CHANGELOG therefore claimed object
animations and slide transitions had shipped in 0.16.0, which they have not. The block is
moved back under
[Unreleased]; nothing of main's 0.16.0 content is touched(
git diff <merge-base> -- CHANGELOG.mdremoves no line).Boundaries touched
sdpm/references/(workflow dependency chain — see AGENTS.md)sdpm/templates/*.pptxandinfra/config.yamlare untouched.