') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); emrg: add iscc compile gate to Windows test job by argszero · Pull Request #731 · argszero/emrg · GitHub
Skip to content

emrg: add iscc compile gate to Windows test job - #731

Merged
argszero merged 6 commits into
masterfrom
feature/iss-compile-gate
Aug 13, 2026
Merged

emrg: add iscc compile gate to Windows test job#731
argszero merged 6 commits into
masterfrom
feature/iss-compile-gate

Conversation

@argszero

@argszeroargszero commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

Fix the v0.2.30 Build Release Windows gate failure (iscc "Invalid number of parameters" at emrg.iss:183:47 on run 31661378619) and add a permanent CI gate so .iss compile errors surface on every PR instead of only at tag-push build time.

Root cause

The #727 stop-log block in packaging/make-installer.sh called LoadStringFromFile(LogFile) — but Inno Setup's Pascal Script signature is function LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean (2-param out-param form, no 1-param string-return form). Test CI never compiles the .iss (only the tag-triggered Build Release runs iscc), so the error shipped.

Changes

  1. .github/workflows/test.yml — new "Inno Setup script compile smoke test" step in the test-windows job: renders make-installer.sh's emrg.iss heredoc (self-syncing sed anchor, same variable expansion as the real build), stubs the gen-assets icon.ico + {app} referenced files, and compiles with the runner's preinstalled iscc. Every PR now catches .iss syntax/signature/type errors.
  2. packaging/make-installer.sh — LoadStringFromFile(LogFile) → LoadStringFromFile(LogFile, LogText) (2-param out-param form).
  3. packaging/make-installer.sh — LogText declared AnsiString (Inno 6 string = UnicodeString → passing it to var S: AnsiString is a compile-time Type mismatch, caught by the new gate).
  4. tests/test_installer_stop.py — positive/negative assertions pinning the correct call form and the AnsiString variable type.

Verification

  • test (ubuntu): actionlint + pytest 761 + GUI 229 — PASS
  • test-windows: pytest + iscc compile smoke test — PASS (proves the .iss now compiles)

argszeroand others added 5 commits August 13, 2026 10:58
…lease windows gate)
v0.2.30 Build Release 31661378619 failed at the windows 'Make installer'
step: iscc rejected the emrg.iss [Code] section with
'Invalid number of parameters' on LoadStringFromFile(LogFile).
Root cause: Inno Setup's Pascal Script API declares
function LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean;
(2-param out-argument form, identical in 6.7.1 through 7.x — verified
against issrc Shared.ScriptFunc.pas). #727's R125 log-surfacing code
called the non-existent 1-param string-returning form; the Test workflow
never compiles the .iss, so the error only surfaced at tag-push Build
Release (v0.2.7 lesson recurring).
Fix (folded into #731's iscc gate):
- make-installer.sh: call LoadStringFromFile(LogFile, LogText) (out-param),
keep FileExists guard + 2000-char truncation
- tests/test_installer_stop.py: assert the 2-param form (positive) and
forbid the 1-param form (negative)
- make-installer.sh: the LoadStringFromFile signature comment used backticks
inside the unquoted <<EOF heredoc — backticks trigger command substitution,
breaking .iss rendering in the real build too (iscc gate caught it)
- test.yml: split assignment from export to silence shellcheck
SC2318/SC2097/SC2098 in the gate step
- test.yml: sed extraction pattern used \$STAGE inside single quotes
(shellcheck SC2016); switch to a dollar-free anchored pattern
- make-installer.sh: reword heredoc comment to avoid literal command
substitution syntax

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (1/3)

Reviewed the full branch (6 commits, both channels' work converged). This fixes the v0.2.30 Build Release failure 31661378619 (windows iscc rejected the .iss [Code] section).

Root cause: Inno Setup's script API is LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean (2-param out-arg; verified against issrc Shared.ScriptFunc.pas at is-6_7_1/is-6_7_3/is-7_1_0/main). #727's R125 code used the non-existent 1-param string-returning form → 'Invalid number of parameters' at compile; Test CI never compiled the .iss so it only surfaced at tag push (v0.2.7 lesson recurring).

Changes (all verified):

  • make-installer.sh: LoadStringFromFile(LogFile, LogText) with LogText: AnsiString (var-param strict typing; string → 'Type mismatch', caught by 31662985004)
  • make-installer.sh: heredoc comment de-backticked (backticks trigger command substitution inside unquoted <<EOF)
  • test.yml windows job: iscc compile smoke gate — renders the .iss heredoc (stub payload + stub icon.ico + {app} files, since icon.ico is a gitignored gen-assets product) and runs the runner's iscc; actionlint-clean (SC2016/SC2097/SC2098/SC2318 all resolved)
  • tests/test_installer_stop.py: positive asserts (2-param form + AnsiString) and negative assert (1-param form forbidden)

Verification: run 31663078864 SUCCESS — test (actionlint + 761 pytest + GUI) and test-windows (pytest + iscc compile) both green. MERGEABLE/CLEAN. This gate would have caught the v0.2.30 failure before tagging.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle. Verified: iscc compile gate passes on the 6-commit branch (LoadStringFromFile 2-param out-param form + LogText: AnsiString); CI run 31663078864 both test + test-windows SUCCESS (actionlint + doc-count guard + iscc gate). The gate reproduces the exact v0.2.30 Build Release failure mode and now compiles clean.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (3/3)

Branch unchanged since 1/3 review (23de096); CI still green (test + test-windows, run 31663078864 SUCCESS). 3 consecutive approvals from different cycles — merging.

@argszero
argszero merged commit ca367ed into masterAug 13, 2026
2 checks passed
argszero pushed a commit that referenced this pull request Aug 13, 2026
…entries (#744)
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
@argszero
argszero deleted the feature/iss-compile-gate branch August 17, 2026 09:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero