Skip to content

Browser wizard: the Compliance step throws ReferenceError (appendDetail is not in scope), so risk-assessment, benchmark and judge controls never render (F-W1-SITE-01) #879

Closed

Description

@cemililik

Wave 1 · theme D1-11: Other high-severity packages · highest severity High · 1 finding(s) · effort small

Summary

Every visit to the in-browser config wizard's Compliance step throws ReferenceError: appendDetail is not defined. The Article 9 risk-assessment textareas and the benchmark and LLM-judge controls never render, and the step counter, YAML preview and saved state stop updating for that step. A user who picks the high-risk tier cannot fill the required risk fields, so the step's own validation can never pass through the UI.

Primary finding

F-W1-SITE-01 — The Compliance step of the browser wizard throws before it renders its risk and evaluation controls

severity High (rated Medium by the source review; raised here because it blocks the high-risk path for every visitor) · confidence high · re-verified by static scope analysis

What happens. makeRequiredTextarea, defined inside STEP_RENDERERS['compliance'], calls appendDetail (site/js/wizard.js:2379), and the same renderer calls it again for the vulnerable-groups row (:2421), the benchmark toggle (:2448) and the judge toggle (:2520). appendDetail is declared only as a local function inside three other renderers — dataset (:1701), training (:1807) and operations (:2617) — so it is not in scope in the compliance renderer, and no other script under site/js/ defines it. makeAccordion runs its buildBody callback eagerly, even for a collapsed accordion (site/js/wizard.js:1406), and the risk-assessment accordion is created for every risk tier (site/js/wizard.js:2342), so the error fires on every visit. render() (site/js/wizard.js:1055-1101) has no try/catch: the exception aborts the rest of the step and skips the counter, YAML-preview and persist work that follows the renderer call.

Where.

Evidence (re-verified on 2026-10-09).

  • Brace-matched scope analysis of site/js/wizard.js: the three appendDetail declarations sit in the blocks of STEP_RENDERERS['dataset'] (lines 1620-1791), ['training'] (1794-2163) and ['operations'] (2604-2938). The four calls at 2379, 2421, 2448 and 2520 lie inside STEP_RENDERERS['compliance'] (2166-2603), where none of the declarations is visible.
  • appendDetail appears in no other file under site/js/ or site/*.html.
  • The source review executed the unmodified renderers in a DOM emulator: entering the Compliance step raised ReferenceError: appendDetail is not defined and the step counter stayed on the previous step; a low-risk configuration could still advance, a high-risk one could not satisfy the step's validation.
  • The site guards (tools/check_site_claims.py, tools/check_site_chrome_parity.py, tools/check_wizard_defaults_sync.py) check copy, page chrome and defaults; none executes the step renderers, so CI cannot see this.

Recommended fix. Declare appendDetail once at the wizard's shared scope (next to makeAccordion) and delete the three local copies, so every renderer uses the same helper. Add a check that would have caught it: a lint step that fails on undefined identifiers in site/js/ (for example ESLint's no-undef), or a DOM smoke test that renders all nine steps.

Acceptance criteria

  • All nine wizard steps render without a console error, in beginner and expert mode and for every risk tier.
  • On the Compliance step the three required risk-assessment textareas, the vulnerable-groups row and the benchmark and judge controls render and can be edited, and a high-risk configuration can pass the step's validation.
  • The step counter, YAML preview and saved state track the Compliance step.
  • A CI check (undefined-identifier lint or a renderer smoke test) fails on the current code and passes after the fix.
  • The finding is resolved or explicitly closed with a reason.

Found by the September 2026 independent review of ForgeLM against commit cab2947 and re-verified against development at f94595f on 2026-10-09. Code links point at cab2947; line numbers may have moved since. Finding IDs (F-W1-…) are stable references for this backlog.

Activity

  1. added
    bugSomething isn't working
    severity: highWrong behaviour or a false claim users rely on
    wave: 1Roadmap wave 1: high severity, small effort
    source: review-2026-09Found by the September 2026 independent review
    on Oct 9, 2026
  2. cemililik commented on Oct 15, 2026

    @cemililik
    CollaboratorAuthor

    Where to start

    Thanks for taking a look. Please confirm the issue is unassigned and comment before starting so work does not overlap.

    Start with these files on development:

    makeRequiredTextarea, defined inside STEP_RENDERERS['compliance'], and the vulnerable-groups, benchmark and judge rows of the same renderer call appendDetail, but appendDetail is only declared as a local function inside three other renderers (dataset, training, operations). On the Compliance step the call throws ReferenceError, so the risk-assessment, benchmark and judge controls never render on the public wizard.

    Declare appendDetail once at the wizard's shared scope (next to makeAccordion) and delete the three local copies.

    The repository has no JavaScript test tooling, so verify in a browser: serve the site with python3 -m http.server -d site 8000 and walk all nine wizard steps in beginner and expert mode and for each risk tier, with the console open. Adding ESLint or a browser test is optional; if you want to propose one, outline it on the issue first.

    Evidence belongs in the PR, not in the tree: describe what you checked and attach any screenshots by dragging them into a PR comment. Do not commit images under site/, because the whole directory is published to GitHub Pages.

    Run the focused tests:

    pytest tests/test_check_site_chrome_parity.py --no-cov

    Run these guards/checks as applicable to the changed files:

    python3 tools/check_site_chrome_parity.py
    python3 tools/check_site_claims.py --strict

    Add a ### Fixed entry under ## [Unreleased] in CHANGELOG.md naming the finding ID.

    Open the PR against development with Fixes #879 once every finding is resolved or explicitly closed with a reason; use Refs #879 for partial work and list the resolved finding IDs (Resolves: F-W1-SITE-01).

  3. cemililik commented on Oct 15, 2026

    @cemililik
    CollaboratorAuthor

    Update: a maintainer is fixing this together with #950, so please pick a different good first issue instead of starting this one.

    #950 asks for the wizard's form labels to be verified in a real browser, including the conditional fields. On every visit, the Compliance step throws ReferenceError: appendDetail is not defined before it renders the risk-assessment, benchmark and judge controls. A headless Chromium run on development (6 wizard scenarios × 9 steps) reproduced the exception in all six scenarios, so #950 cannot be completed while this is open. The fix will land in the same pull request as its own commit, with a DOM-level regression test that renders the Compliance step at every risk tier.

  4. self-assigned this
    on Oct 15, 2026
  5. added 3 commits that reference this issue on Oct 17, 2026
    71beb85
    7f00a9b
    944a128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: siteCode area: sitebugSomething isn't workinggood first issueGood for newcomersseverity: highWrong behaviour or a false claim users rely onsource: review-2026-09Found by the September 2026 independent reviewwave: 1Roadmap wave 1: high severity, small effort

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions