Skip to content

The web provenance version is hard-coded twice in the browser scripts and nothing checks it against the package version #996

Closed

Description

@yakew7

Where: assets/profiler-ui.js (line 23) and assets/profiler-compare.js (line 12), faircode/__init__.py (__version__), tests/test_js_parity_provenance.py.

Current gap: both views declare var FAIRCODE_VERSION = '2.3.0' and write it into every web export's provenance.faircode_version. No test or script compares it with faircode.__version__ (the Python provenance tests do, the web ones use a literal), so the next release bump leaves web exports claiming the old version, and the compare view's comment says only "mirrors profiler-ui.js's own copy".

Repro:

$ grep -n "FAIRCODE_VERSION = " assets/profiler-ui.js assets/profiler-compare.js
assets/profiler-ui.js:23:  var FAIRCODE_VERSION = '2.3.0';
assets/profiler-compare.js:12:  var FAIRCODE_VERSION = '2.3.0'; // mirrors profiler-ui.js's own copy
$ grep -rn "FAIRCODE_VERSION" tests scripts      # no output: nothing checks them

Suggested approach: keep one constant (for example FairCodeShared.VERSION in assets/profiler-shared.js), add a test that it equals faircode.__version__ and pyproject.toml's version, and mention the constant in the release checklist.

Activity

  1. yakew7 commented on Oct 16, 2026

    @yakew7
    OwnerAuthor

    Fixed in cdb6800 (on main). Full suite green (941 passed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions