Skip to content

feat(docs): let anyone try the live site on the invented demo sample - #289

Open
GeiserX wants to merge 10 commits into
mainfrom
pgp/demo-site
Open

GeiserX wants to merge 10 commits into
mainfrom
pgp/demo-site

Conversation

@GeiserX

@GeiserX GeiserX commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Problem

The live site only shows something once you have your own run going behind a password. Someone who wants to see what it does first has nothing to open.

Fix

The docs site now carries a demo at https://geiserx.github.io/OwnGenome/demo/. It is the live page in replay mode on DEMO-001, the invented sample of the docs pictures.

  • tests/demo/make_demo_events.py writes an invented weblog of a DEMO-001 run from assets/steps.tsv: every step with processes, in upstream order, with one retried task and one task near its memory request. The fixture is tests/fixtures/live/demo-001.weblog.jsonl.
  • tests/demo/build_live_demo.py stores those messages one by one in the real Live store, with every bin/owngenome_live_*.py plugin loaded, and keeps Live.state() as a frame each time a step ends or a plugin's state changes. The page, live.js and the plugin scripts are assets/live/ unchanged. Charts, search, run health, the database re-check and the family page all work. The viewer links lead to a page that says the viewer is not in the demo.
  • docs.yml builds the demo into site/demo after the strict MkDocs build, on pull requests too, and the push paths now include the code the demo is built from: assets/** (the page, the plugin scripts and the gene and rule tables render_report.py reads), bin/**, tests/demo/** and tests/fixtures/live/**.
  • render_pictures.py --only live takes docs/images/demo-live-site.png from the demo as the docs publish it. A new live-picture job in Demo pictures runs it and checks the PNG chunks. It needs no container, so it does not wait on the retake job. The picture's browser bypasses the page policy: under script-src 'self' Playwright's wait_for_function cannot poll, and the page's own scripts are all 'self', so the picture does not change.
  • docs/live-site.md has a "Try the demo" section with that picture; docs/index.md and the README link the demo.

Decisions, each the smallest change that keeps main true:

  • The frames are built when the docs are built, not committed. A new plugin then shows up in the demo with no edit here, and the test checks that every registered state hook has a value.
  • The run-health card measures an invented machine (64 GiB, a 2 TiB disk 55% used) and the clock is the time of each replayed message. Without this the public page would show the build machine's disk and RAM and a run gone quiet.
  • Step 24's files (report, charts, search index, summary) are held back until the replayed HTML_REPORT task ends. The re-check comes one hour after the run, with its steps from owngenome_recheck.affected_steps.
  • A static host cannot send headers, so each demo page carries the server's Content-Security-Policy as a meta tag (minus frame-ancestors, which a meta tag cannot set). The site's absolute /runs/ and /family/ links in plugin state become relative.
  • The demo has no password and no access log. It is static and invented, and the docs page says so.
  • In the published build the CPIC recommendations and gene callability sections have no file in the demo sample, so they show as missing. The docs page says so.

No output, option or config key of the pipeline changes. The PR touches nothing the e2e cases exercise (no scripts/, modules/, workflows/, bin/, conf/, assets/ or tests/e2e/ file) and adds no e2e case.

When the live viewer lands, its plugin script and state hook join the demo with no edit here. The test then asks that hook for a value on the demo run, so that merge must be checked against tests/test_live_demo.py.

How it was checked

  • tests/test_live_demo.py (run by the unit-tests job): the weblog fixture matches its generator; every registered hook has a value; the frames follow the run; the invented machine is measured and no build path leaks; every link resolves; every page carries the policy and loads nothing from outside; and a headless Chrome on a static server with no policy header checks replay, charts, search, re-check, run health, family page, viewer page and zero policy violations.
  • Planted mistakes that must fail, in the same test: a fixture missing its last message, a build that drops the charts hook, charts shown before step 24 ended, and an absolute pedigree link. All four fail as they should.
  • In the unit-tests job of an earlier head, the headless Chrome part ran (not skipped) and the four planted mistakes failed as they should: https://github.com/GeiserX/OwnGenome/actions/runs/41843447534/job/126620733783
  • The docs build wrote the demo: "Demo written: site/demo (37 frames, 1425 KB; plugins charts, family, ops, recheck, search)": https://github.com/GeiserX/OwnGenome/actions/runs/41843447567/job/126620733917
  • The picture committed here is the demo-live-picture artifact of https://github.com/GeiserX/OwnGenome/actions/runs/41849289931 (job live-picture green, chunk check passed).
  • The live-picture job went red once the charts were not drawn at the first check (EvalError ... violates the following Content Security Policy directive): https://github.com/GeiserX/OwnGenome/actions/runs/41868569753 With the policy bypassed for the picture it is green: https://github.com/GeiserX/OwnGenome/actions/runs/41873271939
  • The retake job of Demo pictures is red for a reason this PR does not touch: make_demo_sample.py check stops on the callability section, which no demo input feeds since the gene callability change. A pull request built on main fails the same way: https://github.com/GeiserX/OwnGenome/actions/runs/41836158825 That file is outside this PR. The live picture now runs in its own job for that reason.

Bead: pgp-5bja.14

…every plugin hook

The frames are Live.state() with every bin/owngenome_live_*.py plugin loaded,
read while the invented weblog is stored message by message. The test is red
when a build drops one plugin's state hook.

Bead: pgp-5bja.14
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 4685227 and 997e94b.

Files ignored due to path filters: 2
  • docs/images/demo-live-site.png is excluded by !**/*.png
  • tests/fixtures/live/demo/DEMO-FAMILY/members.tsv is excluded by !**/*.tsv
Files selected for processing: 12
  • .github/workflows/demo-pictures.yml
  • .github/workflows/docs.yml
  • README.md
  • docs/index.md
  • docs/live-site.md
  • tests/demo/build_live_demo.py
  • tests/demo/make_demo_events.py
  • tests/demo/render_pictures.py
  • tests/fixtures/live/demo-001.weblog.jsonl
  • tests/fixtures/live/demo/DEMO-001/recheck/state.json
  • tests/fixtures/live/demo/README.md
  • tests/test_live_demo.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@GeiserX

GeiserX commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…the docs publish

The retake job stops before any picture while a report section has no
demo input; the live picture needs no container and should not wait on it.

Bead: pgp-5bja.14
The picture is the artifact of the live-picture job of Demo pictures.

Bead: pgp-5bja.14

This branch has not been deployed

No deployments
Sign up for free to 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