Skip to content

ci(viewer): retry the npm audit and report NOT MEASURED when the advisory endpoint is down - #258

Merged
DrunkOnJava merged 2 commits into
mainfrom
ci/npm-audit-not-measured
Sep 19, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
ci/npm-audit-not-measured

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

The registry advisory endpoint answers 503 during npm maintenance windows,
and npm audit --audit-level=high then exits non-zero without measuring
anything. That turned the viewer dependency audit red on main today with
no advisory behind it.

Retry with backoff and, when the endpoint stays unreachable, emit a
NOT MEASURED warning and pass instead of failing on infrastructure. A
measured run prints valid JSON with a vulnerabilities key; an endpoint
failure does not, so a genuine high or critical advisory still fails the
job.

Testing

  • Reproduced locally: npm audit --audit-level=high on both the branch and main lockfiles fails with the registry 503 maintenance response, so the red on main is infrastructure, not an advisory
  • This PR run exercises the retry path while the endpoint is down

Legal and contribution hygiene

  • Licensable under Apache-2.0; no Autodesk material; no PII

Note

Low Risk
CI-only change to the viewer npm audit step; real high/critical vulnerabilities still fail the job when the registry responds.

Overview
The viewer dependency audit CI step no longer fails immediately when npm audit exits non-zero during npm registry maintenance (503 on the advisory bulk endpoint).

It now runs npm audit --audit-level=high up to four times with increasing backoff, captures JSON output, and distinguishes infrastructure failures from real findings: if the output is valid audit JSON containing a vulnerabilities key, the job still fails on high/critical advisories; if the endpoint stays unreachable after retries, it emits a NOT MEASURED workflow warning and passes instead of blocking main on registry outages.

Reviewed by Cursor Bugbot for commit cb6d757. Configure here.

…sory endpoint is down

The registry advisory endpoint answers 503 during npm maintenance windows,
and `npm audit --audit-level=high` then exits non-zero without measuring
anything. That turned the viewer dependency audit red on main today with
no advisory behind it.

Retry with backoff and, when the endpoint stays unreachable, emit a
NOT MEASURED warning and pass instead of failing on infrastructure. A
measured run prints valid JSON with a `vulnerabilities` key; an endpoint
failure does not, so a genuine high or critical advisory still fails the
job.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 19, 2026 17:35
@DrunkOnJava
DrunkOnJava merged commit 543c290 into main Sep 19, 2026
22 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/npm-audit-not-measured branch September 19, 2026 17:37
DrunkOnJava added a commit that referenced this pull request Sep 19, 2026
…e CI audit path (#261)

## Summary

Bring the prose docs up to what merged on `main` on 2026-09-19 (#256,
#257, #258, #259, the four Dependabot bumps) and correct the
slab-profile claim in `docs/status.md` that RE-25 had already
invalidated. Docs, `README.md` and `CONTRIBUTING.md` only; no Rust, no
`viewer/`, no `CHANGELOG.md`.

## Motivation

`docs/status.md` reported 80 of 80 exact slab profiles from RE-25 and
then, about 40 lines later, still said the slab profile "is still the
bounding-box rectangle rather than the recovered boundary polygon
(#31)". `docs/supported-profile.md` carried the same claim in its
Unsupported list. Separately, nothing in the docs described the bounded
wasm32 inflate reservation, the wasm panic hook, the hash-verified
real-project demo gallery, or the `NOT MEASURED` npm audit path, and
`docs/demos.md` still listed the web viewer as "not yet implemented".

## Changes

- `docs/status.md` — review date to 2026-09-19; the stale slab-profile
sentence now says the profile is the polygon its `OST_SketchLines`
records close on 80 of 80 exported slabs, with the 20 rotated shading
plates named as the remaining rectangle; new paragraph on the
hash-pinned demo gallery; gzip and Browser viewer capability rows
updated with the 1 MiB reservation cap and the real-project demos.
- `docs/supported-profile.md` — the same stale slab claim replaced by
the 20-shading-plate remainder, and the door/window host-wall binding no
longer listed as unsupported (#222 matches Revit's `(host wall, filling
element)` pair set on 138 of 138; it is the opening-index rows that
carry no host claim).
- `README.md` — viewer and demo-gallery paragraphs only: wasm32 memory
behaviour and the panic hook, plus Einhoven / Core Interior sizes and
measured load times.
- `docs/viewer-api.md` — new "Panic reporting and wasm32 memory" section
covering the seven byte-opening bindings that install
`std::panic::set_hook`, `INITIAL_INFLATE_CAPACITY_BYTES`, and the
before/after measurements.
- `docs/viewer-build-pipeline.md` — states that VW1-01..24 shipped and
the recipe is the built workflow; a "wasm32 linear memory is the real
ceiling" subsection under VW1-20 so a future chunked path keeps the
bound.
- `docs/user-guide.md` — the two real-project demos and their honest
decode times in the browser steps; the 801 of 872 storey-containment
figure and the named 71.
- `docs/demos.md` — the "Web viewer ... not yet implemented" bullet
replaced by what actually ships and what is still missing (a broader
redistributable real-project corpus).
- `docs/supply-chain-policy.md` — the npm advisory 503 retry path, why a
`NOT MEASURED` run is not evidence of clean dependencies, and how a
measured advisory is still told apart by the output rather than the exit
code (#258).
- `CONTRIBUTING.md` — the same audit behaviour plus the narrower
pull-request CI shape (#260, open as of 2026-09-19); a fuzz note
explaining that `fuzz/` is outside the workspace gate, which is how
`fuzz_step_writer` broke from #236 until #259.
- `docs/contribution-map.md` — new "Open Remainders" section listing the
six issues closed today and the named remainder behind each of #32,
#33/#219, #23, #86 and #156.

## Testing

N/A: docs-only PR. No Rust or TypeScript changed, so `cargo test` /
`clippy` / `fmt` are unaffected by this diff. Verification performed
instead:

- Every number written was checked against the merged code or its
commit: `INITIAL_INFLATE_CAPACITY_BYTES` and `shrink_to_fit` in
`src/compression.rs`, the seven `install_panic_hook()` call sites in
`src/wasm.rs`, the `sha256` / `size_bytes` entries in
`docs/viewer-demos.json`, the two new Playwright tests in
`viewer/tests/viewer-regression.spec.ts`, the retry block in
`.github/workflows/ci.yml`, and the `#260` diff.
- Relative Markdown links in all ten changed files resolve to existing
paths.
- `git diff --stat` confirms only `docs/`, `README.md` and
`CONTRIBUTING.md` changed.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A resolved limitation is updated: the slab boundary polygon moved
out of the Unsupported list in `docs/supported-profile.md` and out of
the stale sentence in `docs/status.md`, with the 20 rotated shading
plates named as what is genuinely left
- [x] No new limitation introduced
- [x] Commit message describes what changed and why
- [x] No emojis
- [x] No private paths, personal email addresses, or internal jargon
- [x] Not a reverse-engineering finding; no new probe or reconnaissance
addendum needed

## Legal and contribution hygiene

- [x] Licensable under Apache-2.0
- [x] No Autodesk proprietary source, decompiled internals, or NDA'd SDK
content
- [x] No new test fixtures; no real-world PII

## Breaking changes

None.

## Screenshots or output samples

N/A: docs-only PR. No UI or IFC output changed.

## Related issues

Refs #256, #257, #258, #259, #260. Documents the 2026-09-19 closures of
#30, #31, #66, #81, #83 and #87, and the named remainders on #32, #33,
#219, #23, #86 and #156. Closes nothing.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Markdown-only changes with no runtime, CI workflow, or dependency
edits in this diff.
> 
> **Overview**
> This **docs-only** PR brings README, CONTRIBUTING, and nine `docs/`
pages in line with what landed on `main` on 2026-09-19 (#256–#259,
related CI work), and fixes **stale capability wording** that still said
slab plan profiles were bounding-box rectangles after RE-25.
> 
> **Support-boundary honesty:** `docs/status.md` and
`docs/supported-profile.md` now state that **80 of 80** exported slabs
use closed sketch-line polygons; the **20 rotated shading plates** stay
rectangle/`ProfileResolved: false`. Door/window **host-wall binding on
the partition element-record carrier** is documented as closed (#222);
opening-index rows remain unsupported for host claims.
> 
> **Viewer and wasm:** README and `docs/viewer-api.md` /
`docs/viewer-build-pipeline.md` describe the **1 MiB per gzip member**
inflate reservation (#256), **wasm panic → `console.error`**,
hash-verified **Einhoven / Core Interior** demo gallery (#257) with
sizes and load times, and Playwright staging checks. `docs/demos.md`
replaces “web viewer not yet implemented” with what ships vs a broader
real-project corpus still missing.
> 
> **Contributor / CI prose:** `CONTRIBUTING.md` and
`docs/supply-chain-policy.md` explain **npm audit retries** and **`NOT
MEASURED` warnings** when the advisory API is down (#258), plus
**narrower pull-request CI** vs `main` (#260). CONTRIBUTING adds a
**fuzz workspace** note: PR gates do not compile `fuzz/`—run nightly
`cargo +nightly check --manifest-path fuzz/Cargo.toml` when changing
types fuzz targets construct (#259).
> 
> **Roadmap:** `docs/contribution-map.md` adds an **Open Remainders**
table naming what is left after six issues closed the same day.
`docs/user-guide.md` mirrors demo expectations and **801/872** storey
containment with the named 71 unbound.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ac4354d. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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