studio-engine 0.65.2 → 0.65.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/lib/studio/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7389678882ebbd2bba6a35738f330283a2e5a226e68009a76b83f0c14b0e1351
4
- data.tar.gz: de1b1a74888a3c2e47cc39da0377323c1b51c04d1aa718de9826fc338aff13a8
3
+ metadata.gz: 8ed062df7a9840a9633eb1c4995bc878bee401f98d85086e7943c5ec9f6b55d4
4
+ data.tar.gz: df0c1c7dc4e13185b3c8e3fbe7cb9243f4b310398843c43913ef0a1aa7b03762
5
5
  SHA512:
6
- metadata.gz: f2c671579063631d50ac0298f2812ccde9a32a4554cc85ecf2b23368a8f51d2027f4eb03ed748c87104b7b68c9150d4fa7accec288d6b1a545ddf6233c755847
7
- data.tar.gz: f2a53ef58b2bc5959d3a0c420f0cb8619b448caf496b9b437cd70e4f79ca5d8652e482338f2472ad3fd3f4b2609c0e5c47e8f0c7da3ca44d4d7b9e9828cb4f80
6
+ metadata.gz: ca97a89b5c1452bad931ec0a332e9fff228ea43b7ebe2249516b3f60b9bf79f03fcb3171a66c5b8c7692e25389ac15d24a8c70b0176a82921fee80b2dd80a06e
7
+ data.tar.gz: 97061141650afc6472e15bcaf40dc96c5175897a25f6d4aea5cfb318dd1d92100db6cb1aa52c3feb4a018fe93bb924485fdee7fe97d5989a7779dfb0959b03c0
data/CHANGELOG.md CHANGED
@@ -6,6 +6,44 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
6
6
 
7
7
  ### Added
8
8
 
9
+ - **A green comment-leak scan used to mean "not looked at".**
10
+ `test/views/erb_comment_leak_test.rb` guards the ERB comment form in
11
+ `app/views/**/*.erb`. It never looked inside `<script>`, and that is where this
12
+ gem keeps its browser programs — `studio/modals/_host`,
13
+ `studio/solana/_phantom_deeplink`, `layouts/studio/_head` and the modal blocks
14
+ between them hold **1_239 JavaScript comments, 73_913 bytes of comment body**,
15
+ none of it read by any guard. A review of a diff made almost entirely of those
16
+ comments came back green, and the reviewer's note was the honest reading of it:
17
+ *"don't read that green as clearance."*
18
+
19
+ `test/views/script_comment_leak_test.rb` reads them. The rule is the one the ERB
20
+ guard applies — no ERB open or close sequence inside a comment body — and the
21
+ mechanism it defends against is worse than the ERB one. A tag quoted inside an
22
+ ERB comment is inert, because the comment swallows it. A tag quoted inside a
23
+ **JavaScript** comment is not inside anything ERB knows about, so ERB opens a tag
24
+ right there and **runs** it: a complete tag evaluates at render, and an
25
+ incomplete one swallows every byte up to the next close sequence in the file,
26
+ deleting working JavaScript with no syntax error to show for it. Wrapping the
27
+ line in an HTML comment does not help — ERB runs inside those too. Describing the
28
+ tag in words stays legal, exactly as it is for ERB comments.
29
+
30
+ **Finding a comment is the hard half, and the first cut of this got it wrong.**
31
+ Anchoring `<script>` blocks on raw source let an ERB comment's *prose mention* of
32
+ a script tag open the block: `studio/_board_assets.html.erb` reported 19_512
33
+ bytes of markup as JavaScript and never saw its real program on its own terms.
34
+ Blocks are now anchored on a copy with ERB tags and HTML comments blanked out,
35
+ length preserved so offsets and line numbers still land. Inside a block the
36
+ walker tracks the states that can hide a comment opener — a string
37
+ (`"https://…"` is not a comment), a template literal, a regex (`/\/\//`) — and a
38
+ literal or comment that never closes is REPORTED rather than absorbed, because a
39
+ walker that quietly lost its place is the same green as a clean file. The
40
+ assertions check the input as well as the verdict: how many blocks, comments and
41
+ bytes the scan actually reached, and that every block it opened matches a real
42
+ closing tag.
43
+
44
+ Zero findings across the engine at `origin/accepted`, so this lands green with no
45
+ allowlist.
46
+
9
47
  - **`data-pin` — the pinned stack publishes itself.** `--nav-h` / `--nav-bottom`
10
48
  answer for one element. Everything else that pins has been re-deriving the
11
49
  same geometry by hand: on `mcritchie-studio`'s `/deployments` the app strip
@@ -1,3 +1,3 @@
1
1
  module Studio
2
- VERSION = "0.65.2"
2
+ VERSION = "0.65.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: studio-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.65.2
4
+ version: 0.65.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex McRitchie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-28 00:00:00.000000000 Z
11
+ date: 2026-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails