Skip to content

Number the publish-verify gates; make the smoke npm-registry vet honest - #2786

Merged
chalin merged 24 commits into
docsy:mainfrom
chalin:chalin-m24-notes-step15-substeps-2026-0902
Sep 3, 2026
Merged

chalin merged 24 commits into
docsy:mainfrom
chalin:chalin-m24-notes-step15-substeps-2026-0902

Conversation

@chalin

@chalin chalin commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator
  • Numbers step 15's publish-verify gates (approve, check, re-point next, vet) so release trackers box each individually: the 0.17.0 run's single box hid the pending next re-point after the publish landed
  • Makes the smoke suite's npm-registry vet honest: the 0.17.0 vet silently smoke-tested 0.16.0 (a local min-release-age gate redirected the bare install); the suite now vets an exact version (the checkout's, when its release tag is in the checkout's history; a stable-stamped untagged checkout is release prep pre-publish and keeps vetting latest), asserting the installed version against the npm registry's own resolution (fetched from a fresh cache) immediately after the install; a checkout without usable git identity fails the vet rather than guessing; overrides are restricted to exact-version or dist-tag forms, and the prerelease vet (@next) is documented at the manual-publish bullet
  • Honors local npm hardening in both directions: the suite never relaxes ambient npm config on its own; an install guard fails the run with its own remedy, and an age-gated fresh theme fails naming DOCSY_THEME_MIN_RELEASE_AGE=N, a suite-owned knob applied to the theme-package installs only (review rounds falsified two earlier generic-knob designs on hardened machines)
  • Re-homes the smoke mechanics in a new Test suites ### test:smoke subsection (build matrix, security contract, overrides), leaving step 15.4 as the command
  • Pins scratch-site sass-embedded to the repo's tested version on all six legs, and pins the scratch install's @docsy registry to npmjs (where the version expectation is resolved)
  • Preview: Publishing a release § step 15

@chalin chalin added this to the 0.18.0 milestone Sep 2, 2026
@chalin
chalin force-pushed the chalin-m24-notes-step15-substeps-2026-0902 branch from f4c2963 to 6d7cc94 Compare September 2, 2026 10:45
@chalin chalin changed the title Maintainer notes: number the npm publish-verify substeps Number the publish-verify gates; make the smoke registry vet honest Sep 3, 2026
@chalin chalin changed the title Number the publish-verify gates; make the smoke registry vet honest Number the publish-verify gates; make the smoke npm-registry vet honest Sep 3, 2026
- Numbers step 15's four sequential gates (approve, check, re-point next, vet) so release trackers box each individually: the 0.17.0 run carried them as one box, hiding which gates remained
- Adds the missing final gate: vet the published artifact via the registry smoke run (exercised manually on 0.17.0)
Review finding (confirmed live): under min-release-age, the suite's bare @docsy/theme install silently resolves the previous eligible stable, so an unpinned run false-greens the vet; the 0.17.0 run installed 0.16.0.
- Cross-links the update guide's release-age trap instead of restating it; drops suite mechanics (smoke.mjs owns them) and the 0.17.0 history (PR record)
- Front-loads the action and replaces the ambiguous "from main at the tag" with $BASE
- Derives an exact registry pin (checkout theme version at a release tag, else the registry's true latest), so resolution no longer passes through local age gates that silently redirect a bare spec to the previous stable; DOCSY_THEME_PKG still overrides
- Asserts the installed version on the tarball and registry legs, turning resolution drift into a red; both legs print the installed version as run evidence
- Pre-authorizes the suite's own scratch installs under the npm-guard wrapper: the release vet is a plain `npm run test:smoke` again (notes step 15.4 simplified back)
Owner call, reversing the previous commit's baked overrides: repo tests never silently disarm a machine's security settings. An install-blocking PATH guard fails once, up front (before-hook probe); an age-gated fresh release fails the registry test with the deliberate-rerun knob. Both messages red-proofed on a hardened machine.
An unpinned install pulled the registry's latest into every consumer scratch site, letting a fresh upstream sass release perturb suite results.
- Verifies every spec form (exact, dist-tag, bare) via an ungated npm view expectation, closing the override path a local age gate could still silently redirect; distinguishes not-published from age-gated in the failure text; resolves registry-side state inside the test so a view failure can't abort the whole file
- Completes the sass-embedded pin on the make-site legs, reading the version from the repo manifest (its one home)
- Moves smoke mechanics to their owner (Test suites section + suite comments), slimming publish-verify substep 4 back to the command; adds the changelog entry
- Asserts the installed version right after the install, before building the redirected version could mask the age-gate diagnostic; guards the view resolution's shape so range specs fail at the cause
- Documents the prerelease vet (DOCSY_THEME_PKG=@docsy/theme@next) in the manual-publishes bullet: at a prerelease checkout a bare run vets the previous stable
- Guards make-site's manifest read against an empty substitution (which npm would resolve as latest, the exact unpinned install the pin prevents); limits the tarball stamp tolerance to -dev checkouts
- Notes that a hardened machine's first smoke run fails by design; unifies assert.fail message stance
… path

- Derives the exact registry pin only when the stable manifest's release tag exists: a stable-stamped untagged checkout is release prep pre-publish (notes step 8), where demanding the unpublished version deterministically blocked the canonical pre-tag smoke gate
- Pins the scratch install's scoped registry to npmjs (where the expectation was resolved), and rejects overrides that don't target the registry package: both paths could otherwise vet a different artifact while reporting a registry vet
- Asserts dist-tag resolution == checkout version at prerelease checkouts (a stale next tag vetted the wrong artifact); treats an empty override as unset
- Rerun guidance now composes: each failure says to add its knob to the current command instead of prescribing a fresh one that drops the others
- Version-shape-guards both sass-pin reads (node prints literal "undefined" for an absent property at status 0, slipping a non-empty check)
- Requires the release tag to be in the checkout's history (rev-parse + merge-base), not merely to exist: a tag elsewhere proved nothing about what this checkout represents; unusable git identity (shallow/tagless/archive) fails the registry test with the override named instead of silently vetting latest
- Restricts the override to exact-version or dist-tag forms of the registry package: on Windows the spec reaches npm through a shell, so metacharacters and ranges stay out
- At a prerelease checkout, any non-matching resolution now fails naming the @next override (a bare run's latest vetted the wrong artifact); the notes bullet matches the behavior
- Tightens both sass-pin guards to exact-semver shapes (1.x-style ranges slipped the leading-digit checks)
Owner review: the before-hook probe duplicated the guard's own message (WET) and was coupled to one shim's stderr fingerprint; a blocked install fails loud through run()'s stderr dump, remedy included.
Owner review: the same remedy text sat in both the ETARGET branch and the mismatch assert; the shared const also softens the knob guidance (N no lower than the release age, not always 0) and records why the run-wide override is acceptable (every registry install is an exact reviewed pin).
Owner call: Docsy is getting its own plugin registry, so a bare "registry" in identifiers, test names, messages, and docs becomes ambiguous; the smoke-npm-registry site name also stops colliding with smoke-npm (the GitHub-via-npm leg).
…spec-guard gaps

- Captures the granted NPM_CONFIG_MIN_RELEASE_AGE, strips it from the child-install environment, and re-applies it only to the theme install: scratch sites have no lockfile, so a run-wide relaxation would admit fresh transitive releases under the other pinned top-levels
- Declares derivationError before the load-time derivation call: the unusable-git-identity path hit a TDZ ReferenceError that aborted all six tests instead of failing one with its message (end-to-end red-proofed this time)
- Rejects range specs in the override guard (a ~ or partial-version spec resolved deterministically and slipped the "exact or dist-tag" contract); the tagless-clone note names the unfetched-tags possibility and its remedies
Adversarial round falsified the capture design on the release driver's machine: an ambient npm_config_min_release_age export wins the first-match capture over the command's NPM_CONFIG_MIN_RELEASE_AGE, making the documented rerun loop; and stripping the env inverted env-borne hardening for the other installs.

- DOCSY_THEME_MIN_RELEASE_AGE (numeric-validated) is the vet override, applied as a flag on the theme-package installs only, outranking env config by construction; the suite no longer reads or strips npm config env at all, so ambient hardening flows to every install in both directions
- Documents the residual constraint: other pinned scratch installs stay under the ambient gate, and a younger-than-gate pin fails its leg until it ages
- Riders: expected-nonzero git probes stop dumping failure noise (bare spawnSync); dotted dist-tags accepted; "slow, network-bound" restored to the test:smoke docs; guard-vs-age-gate remedies unconflated
… claims

- A fatal ancestry check silently fell back to vetting latest; it now fails the npm-registry test naming the override, matching the tag probe's status routing
- Attributes ETARGET to the age gate only on npm's date-cutoff diagnostic (a broken dependency pin was getting the age remedy); caps the knob at 4 digits (a huge value overflowed npm's date math)
- Narrows the hardening claims: never relaxed on its own (the one relaxation is the operator's knob); make-site scratch sites carry their own baked consumer-simulation gate; the RC-only scope of the prerelease override is explicit
Splits build-matrix facts from the security contract; typo and bound fixes ride along (the age-knob bound is the release age, not the consumer-sim gate's 7).
- --prefer-online on the expectation view: under an offline/prefer-offline npm config, view and install agreed on the same stale cache, so the equality assert couldn't see a stale-latest vet
- Accepts hyphens in prerelease/build identifiers and rejects underscores, per the semver grammar (0.18.0-rc-1 was refused; 1.2.3-alpha_beta was admitted)
@chalin
chalin force-pushed the chalin-m24-notes-step15-substeps-2026-0902 branch from df6ca64 to 976bca1 Compare September 3, 2026 19:30
- themePkgSpec: the parameter is the Docsy theme's package spec (tarball path or registry form), not an arbitrary one
- The knob doc names what the relaxation covers: the theme-package install commands and the dependencies they resolve, nothing else in the run; reader-facing "knob" swapped for "override"
…bound

- The view runs against an empty scratch cache: --prefer-online was a no-op (view already prefers online), lost to ambient offline/prefer-offline config, and a warm cache served stale-if-error; a cache miss can't be served stale, so an offline run now fails loudly (ENOTCACHED) instead of agreeing with a stale install
- The override guidance had its bound inverted in both homes: min-release-age admits versions older than N, so N must equal the release age (higher still blocks, lower over-relaxes)
- Notes: table row links the subsection; the Hugo axis is a build variant, not a source; the prerelease vet names its precondition (stamp still in the manifest); local-guard wording made generic; tarball-leg ETARGET message names the dep pins
@chalin
chalin merged commit 17ae5c3 into docsy:main Sep 3, 2026
18 checks passed
@chalin
chalin deleted the chalin-m24-notes-step15-substeps-2026-0902 branch September 3, 2026 20:30
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