elementary-assertions 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -5
- package/README.md +10 -0
- package/SECURITY.md +19 -0
- package/docs/BASELINE_TEST_RUN.md +33 -0
- package/docs/GUARANTEES.md +28 -0
- package/docs/NPM_RELEASE.md +33 -10
- package/docs/REPO_WORKFLOWS.md +22 -1
- package/docs/STATUSQUO.md +21 -0
- package/package.json +31 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,13 +3,51 @@
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
|
-
-
|
|
7
|
-
- `v1.0.0` metadata-flip release-gate evidence recorded in TODO (tests, pack dry-run, clean-install smoke roots).
|
|
6
|
+
- (none)
|
|
8
7
|
|
|
9
8
|
### Changed
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
- (none)
|
|
10
|
+
|
|
11
|
+
## v1.0.2 - 2026-02-15
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- `.editorconfig` for repository-wide LF/indent/newline consistency.
|
|
15
|
+
- `CONTRIBUTING.md` and `SECURITY.md` repository policy documents.
|
|
16
|
+
- `scripts/ensure-clean-worktree.js` plus release-check npm scripts for safer local release gating.
|
|
17
|
+
- `.github/workflows/release.yml` manual release-check workflow with optional npm publish gate.
|
|
18
|
+
- `scripts/smoke-release.js` and `npm run smoke:release` for local tarball-based smoke execution.
|
|
19
|
+
- baseline lint setup (`.eslintrc.cjs`, `npm run lint`, ESLint dev dependency).
|
|
20
|
+
- package engine floor metadata (`"engines": { "node": ">=24.0.0" }`) plus contract test coverage.
|
|
21
|
+
- additional governance/quality docs: `docs/GUARANTEES.md`, `docs/BASELINE_TEST_RUN.md`, `docs/STATUSQUO.md`.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- CI install step now uses `npm ci` for deterministic dependency installation.
|
|
25
|
+
- `README.md` documentation index now links `CONTRIBUTING.md` and `SECURITY.md`.
|
|
26
|
+
- Release/workflow docs now reference local smoke helper and optional CI-assisted release checks.
|
|
27
|
+
- `npm run ci:check` now includes lint before test/report/pack checks.
|
|
28
|
+
- CI workflow now uses concurrency cancellation, npm cache, and explicit lint gate.
|
|
29
|
+
- `README.md`, `CONTRIBUTING.md`, `docs/NPM_RELEASE.md`, and `docs/REPO_WORKFLOWS.md` now align on Node.js `>=24`.
|
|
30
|
+
- `README.md` documentation index now includes guarantees, baseline-test, and status snapshot docs.
|
|
31
|
+
|
|
32
|
+
## v1.0.1 - 2026-02-15
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
- First npmjs publication of `elementary-assertions`.
|
|
36
|
+
- Phase 17 publication evidence recorded in `TODO.md` (npmjs version/dist-tag checks and publish timestamp).
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
- Publish-safe manifest normalization applied for CLI bin path format (`bin/elementary-assertions.js` without `./`) before npmjs publication.
|
|
40
|
+
- Release discipline preserved: `v1.0.0` tag kept intact; publish fix shipped as patch `v1.0.1`.
|
|
41
|
+
|
|
42
|
+
### Release Evidence
|
|
43
|
+
- Release commit: `b1883933e29132c4c0bc11818a921db053facda2`
|
|
44
|
+
- Tag: `v1.0.1`
|
|
45
|
+
- npmjs verification:
|
|
46
|
+
- `npm view elementary-assertions version` -> `1.0.1`
|
|
47
|
+
- `npm view elementary-assertions dist-tags.latest` -> `1.0.1`
|
|
48
|
+
- Smoke roots:
|
|
49
|
+
- `C:\code\elementary-assertions-smoke-test\v1.0.1-git-smoke-20260215-174021`
|
|
50
|
+
- `C:\code\elementary-assertions-smoke-test\v1.0.1-npmjs-smoke-20260215-174021`
|
|
13
51
|
|
|
14
52
|
## v0.1.12 - 2026-02-15
|
|
15
53
|
|
package/README.md
CHANGED
|
@@ -18,6 +18,11 @@ The library is conservative by design:
|
|
|
18
18
|
|
|
19
19
|
Its authoritative boundary ends at elementary assertions. Anything beyond this layer (concept models, norms, governance, domain interpretation) is explicitly downstream.
|
|
20
20
|
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
- Node.js `>=24`
|
|
24
|
+
- npm
|
|
25
|
+
|
|
21
26
|
## What this package is
|
|
22
27
|
|
|
23
28
|
elementary-assertions is an assertion compiler that sits directly after linguistic relation extraction.
|
|
@@ -203,8 +208,13 @@ For non-public developer quality tooling (`npm run dev:*`), see `docs/DEV_TOOLIN
|
|
|
203
208
|
- Repository workflow policies: `docs/REPO_WORKFLOWS.md`
|
|
204
209
|
- Release flow: `docs/NPM_RELEASE.md`
|
|
205
210
|
- Developer tooling (non-public): `docs/DEV_TOOLING.md`
|
|
211
|
+
- Guarantees: `docs/GUARANTEES.md`
|
|
212
|
+
- Baseline test run: `docs/BASELINE_TEST_RUN.md`
|
|
213
|
+
- Status snapshot guide: `docs/STATUSQUO.md`
|
|
206
214
|
- Release notes template: `docs/RELEASE_NOTES_TEMPLATE.md`
|
|
207
215
|
- Changelog: `CHANGELOG.md`
|
|
216
|
+
- Contributing guide: `CONTRIBUTING.md`
|
|
217
|
+
- Security policy: `SECURITY.md`
|
|
208
218
|
|
|
209
219
|
## License
|
|
210
220
|
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a Vulnerability
|
|
4
|
+
|
|
5
|
+
Report vulnerabilities privately via GitHub Security Advisories for this repository.
|
|
6
|
+
|
|
7
|
+
Include:
|
|
8
|
+
- affected version
|
|
9
|
+
- reproduction steps
|
|
10
|
+
- expected vs actual behavior
|
|
11
|
+
- potential impact
|
|
12
|
+
|
|
13
|
+
## Scope
|
|
14
|
+
|
|
15
|
+
Security-relevant issues include:
|
|
16
|
+
- input-validation bypasses
|
|
17
|
+
- unintended data exposure in logs or responses
|
|
18
|
+
- authn/authz bypasses (if present in your project)
|
|
19
|
+
- dependency or supply-chain risks in release flow
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Baseline Test Run
|
|
2
|
+
|
|
3
|
+
Purpose: define a stable end-to-end verification baseline, even where external dependencies can vary.
|
|
4
|
+
|
|
5
|
+
## Verify Stable Invariants
|
|
6
|
+
|
|
7
|
+
- CLI/API wiring works end-to-end.
|
|
8
|
+
- State-changing commands persist expected changes.
|
|
9
|
+
- Rejected/no-op paths do not mutate persisted state.
|
|
10
|
+
- Required output envelope fields are present.
|
|
11
|
+
- Exit codes follow contract (`0` success, non-zero failure).
|
|
12
|
+
|
|
13
|
+
## Do Not Over-Constrain External Surfaces
|
|
14
|
+
|
|
15
|
+
Avoid hard-locking:
|
|
16
|
+
- exact wording of externally influenced text
|
|
17
|
+
- full byte-identical outputs from unstable external services
|
|
18
|
+
- incidental ordering not declared as part of contract
|
|
19
|
+
|
|
20
|
+
## Recommended Baseline Strategy
|
|
21
|
+
|
|
22
|
+
1. Define fixture(s).
|
|
23
|
+
2. Run command sequence.
|
|
24
|
+
3. Assert invariant checkpoints.
|
|
25
|
+
4. Capture result summary (counts/flags/hashes) instead of fragile full-output strings.
|
|
26
|
+
5. Keep one deterministic smoke path in CI (`npm run smoke:release` + release smoke checks).
|
|
27
|
+
|
|
28
|
+
## Suggested Run Checklist
|
|
29
|
+
|
|
30
|
+
- `npm run lint`
|
|
31
|
+
- `npm test`
|
|
32
|
+
- `npm run pack:check`
|
|
33
|
+
- `npm run smoke:release`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Guarantees
|
|
2
|
+
|
|
3
|
+
This file defines core behavior guarantees for `elementary-assertions`.
|
|
4
|
+
|
|
5
|
+
## Core Guarantees
|
|
6
|
+
|
|
7
|
+
- Deterministic behavior:
|
|
8
|
+
- identical input + options produce identical output within the same version, under documented determinism scope.
|
|
9
|
+
- Fail-fast validation:
|
|
10
|
+
- malformed input is rejected explicitly.
|
|
11
|
+
- Clear authority boundary:
|
|
12
|
+
- persisted output is authoritative.
|
|
13
|
+
- view/tooling outputs are derived and non-authoritative.
|
|
14
|
+
- Stable error surface:
|
|
15
|
+
- validation failures use stable error codes for consumer branching.
|
|
16
|
+
|
|
17
|
+
## Non-Goals
|
|
18
|
+
|
|
19
|
+
`elementary-assertions` does not implicitly provide:
|
|
20
|
+
- hidden retries
|
|
21
|
+
- silent auto-repair of invalid input
|
|
22
|
+
- implicit mutation of persisted state from read-only commands
|
|
23
|
+
- undocumented public API surfaces
|
|
24
|
+
|
|
25
|
+
## Design Rule
|
|
26
|
+
|
|
27
|
+
Prefer small, explicit mechanics over broad abstractions.
|
|
28
|
+
If behavior is important, make it contract-tested.
|
package/docs/NPM_RELEASE.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This document defines the release flow for `elementary-assertions`.
|
|
4
4
|
|
|
5
|
-
Current distribution status
|
|
6
|
-
After npmjs publication: publish to npmjs while keeping Git-tag installs supported.
|
|
5
|
+
Current distribution status: published to npmjs; Git-tag installs remain supported.
|
|
7
6
|
`files` is used to keep both Git installs and npm tarballs deterministic.
|
|
8
7
|
|
|
9
8
|
Examples (consumer `package.json`):
|
|
@@ -31,11 +30,12 @@ Golden baseline freeze metadata is maintained in `test/artifacts/README.md`.
|
|
|
31
30
|
- `package.json` `files` is the primary packlist control.
|
|
32
31
|
- `.npmignore` is an additional safeguard for local non-package files.
|
|
33
32
|
|
|
34
|
-
## 0) Preconditions
|
|
35
|
-
|
|
36
|
-
- Working tree clean.
|
|
37
|
-
-
|
|
38
|
-
-
|
|
33
|
+
## 0) Preconditions
|
|
34
|
+
|
|
35
|
+
- Working tree clean.
|
|
36
|
+
- Node.js `>=24`.
|
|
37
|
+
- `npm test` passes.
|
|
38
|
+
- If `runElementaryAssertions` is used in smoke tests, ensure any required `wikipedia-title-index` endpoint is reachable.
|
|
39
39
|
|
|
40
40
|
## 1) Prepare release branch
|
|
41
41
|
|
|
@@ -81,7 +81,7 @@ Cleanup after local pack steps:
|
|
|
81
81
|
Remove-Item -Force .\elementary-assertions-*.tgz
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
## 5) Smoke install checks (pre-tag)
|
|
84
|
+
## 5) Smoke install checks (pre-tag, Git install path)
|
|
85
85
|
|
|
86
86
|
Create a clean workspace and install from the commit hash you intend to tag.
|
|
87
87
|
Use the shared smoke script so API/CLI checks and render parity are enforced together.
|
|
@@ -137,7 +137,7 @@ git tag -a vX.Y.Z -m "vX.Y.Z"
|
|
|
137
137
|
git push origin vX.Y.Z
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
## 8) Post-tag verification (install from tag)
|
|
140
|
+
## 8) Post-tag verification (install from tag, Git path)
|
|
141
141
|
|
|
142
142
|
```powershell
|
|
143
143
|
$SmokeRoot = "C:\code\elementary-assertions-smoke-test\vX.Y.Z-posttag-smoke-$(Get-Date -Format yyyyMMdd-HHmmss)"
|
|
@@ -164,7 +164,22 @@ npm view elementary-assertions version
|
|
|
164
164
|
npm view elementary-assertions dist-tags.latest
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
-
|
|
167
|
+
- For every newly published release, run a clean-install smoke check from npmjs package (same smoke-root naming convention):
|
|
168
|
+
|
|
169
|
+
```powershell
|
|
170
|
+
$SmokeRoot = "C:\code\elementary-assertions-smoke-test\vX.Y.Z-npmjs-smoke-$(Get-Date -Format yyyyMMdd-HHmmss)"
|
|
171
|
+
New-Item -ItemType Directory -Path $SmokeRoot -Force | Out-Null
|
|
172
|
+
Set-Location $SmokeRoot
|
|
173
|
+
npm init -y | Out-Null
|
|
174
|
+
|
|
175
|
+
npm i elementary-assertions@X.Y.Z
|
|
176
|
+
node C:\code\elementary-assertions\scripts\release-smoke-check.js --repo-root C:\code\elementary-assertions --smoke-root $SmokeRoot --out-root (Join-Path $SmokeRoot "rendered")
|
|
177
|
+
npm ls elementary-assertions
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
- Mandatory release evidence for each published version:
|
|
181
|
+
- one Git-install smoke root (`vX.Y.Z-git-smoke-*`)
|
|
182
|
+
- one npmjs-install smoke root (`vX.Y.Z-npmjs-smoke-*`)
|
|
168
183
|
|
|
169
184
|
## Failure rule
|
|
170
185
|
|
|
@@ -175,3 +190,11 @@ Ship a new patch version with a new tag.
|
|
|
175
190
|
|
|
176
191
|
Create/update release notes using:
|
|
177
192
|
- `docs/RELEASE_NOTES_TEMPLATE.md`
|
|
193
|
+
|
|
194
|
+
## Optional CI-assisted release check
|
|
195
|
+
|
|
196
|
+
The repository also provides a manual GitHub Actions workflow:
|
|
197
|
+
|
|
198
|
+
- `.github/workflows/release.yml`
|
|
199
|
+
|
|
200
|
+
It validates tag format/ancestry, runs quality gates, verifies package version vs tag, runs release smoke, and can optionally publish to npmjs when `publish_to_npm=true` and `NPM_TOKEN` is configured.
|
package/docs/REPO_WORKFLOWS.md
CHANGED
|
@@ -36,7 +36,8 @@ This benchmark is advisory for repo workflow only (trend watching) and is not a
|
|
|
36
36
|
## CI gates (repo workflow)
|
|
37
37
|
|
|
38
38
|
Current CI workflow gates on:
|
|
39
|
-
- `npm
|
|
39
|
+
- `npm ci`
|
|
40
|
+
- `npm run lint`
|
|
40
41
|
- `npm test`
|
|
41
42
|
- dev report script execution:
|
|
42
43
|
- `npm run dev:report:metrics`
|
|
@@ -46,3 +47,23 @@ Current CI workflow gates on:
|
|
|
46
47
|
- packed-tarball clean-install smoke check via `scripts/release-smoke-check.js`
|
|
47
48
|
|
|
48
49
|
These are repository quality gates and release hygiene checks, not package runtime contract.
|
|
50
|
+
|
|
51
|
+
## Local release preflight (repo workflow)
|
|
52
|
+
|
|
53
|
+
Run local preflight checks before tagging:
|
|
54
|
+
|
|
55
|
+
```powershell
|
|
56
|
+
npm run release:check
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This command enforces:
|
|
60
|
+
- clean git worktree (`scripts/ensure-clean-worktree.js`)
|
|
61
|
+
- repository quality gates via `npm run ci:check`
|
|
62
|
+
|
|
63
|
+
Optional local smoke helper:
|
|
64
|
+
|
|
65
|
+
```powershell
|
|
66
|
+
npm run smoke:release
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This creates a temporary local smoke workspace under `test/_smoke/`, installs from a packed tarball, and runs `scripts/release-smoke-check.js`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Status Quo
|
|
2
|
+
|
|
3
|
+
Use this file as a concise operational snapshot of repository state.
|
|
4
|
+
|
|
5
|
+
Update it when significant milestones are reached.
|
|
6
|
+
|
|
7
|
+
Suggested structure:
|
|
8
|
+
|
|
9
|
+
- Repo status:
|
|
10
|
+
- branch and sync state
|
|
11
|
+
- major pending workstreams
|
|
12
|
+
- Runtime status:
|
|
13
|
+
- key commands currently working
|
|
14
|
+
- known setup constraints
|
|
15
|
+
- Quality status:
|
|
16
|
+
- latest local check results (for example: `npm run ci:check`)
|
|
17
|
+
- known flaky areas (if any)
|
|
18
|
+
- Documentation status:
|
|
19
|
+
- docs updated in the latest cycle
|
|
20
|
+
|
|
21
|
+
Keep this file factual and short.
|
package/package.json
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elementary-assertions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Deterministic, auditable assertion-construction layer for Node.js.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"nlp",
|
|
7
|
+
"assertions",
|
|
8
|
+
"determinism",
|
|
9
|
+
"linguistics",
|
|
10
|
+
"validation"
|
|
11
|
+
],
|
|
12
|
+
"author": "svenschaefer",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/svenschaefer/elementary-assertions.git"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/svenschaefer/elementary-assertions/issues"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/svenschaefer/elementary-assertions#readme",
|
|
4
21
|
"license": "MIT",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=24.0.0"
|
|
24
|
+
},
|
|
5
25
|
"private": false,
|
|
6
26
|
"type": "commonjs",
|
|
7
27
|
"main": "./src/index.js",
|
|
@@ -21,12 +41,18 @@
|
|
|
21
41
|
"docs/",
|
|
22
42
|
"README.md",
|
|
23
43
|
"CHANGELOG.md",
|
|
24
|
-
"LICENSE"
|
|
44
|
+
"LICENSE",
|
|
45
|
+
"SECURITY.md"
|
|
25
46
|
],
|
|
26
47
|
"scripts": {
|
|
48
|
+
"lint": "eslint src bin test scripts",
|
|
27
49
|
"test": "node --test \"test/**/*.test.js\"",
|
|
28
50
|
"test:unit": "node --test \"test/unit/**/*.test.js\"",
|
|
29
51
|
"test:integration": "node --test \"test/integration/**/*.test.js\"",
|
|
52
|
+
"pack:check": "npm pack --dry-run",
|
|
53
|
+
"smoke:release": "node scripts/smoke-release.js",
|
|
54
|
+
"ci:check": "npm run lint && npm test && npm run dev:report:metrics && npm run dev:report:hotspots && npm run dev:report:maturity && npm run pack:check",
|
|
55
|
+
"release:check": "node scripts/ensure-clean-worktree.js && npm run ci:check",
|
|
30
56
|
"benchmark:core": "node scripts/benchmark-run-from-relations.js",
|
|
31
57
|
"dev:check": "node scripts/dev-check.js",
|
|
32
58
|
"dev:report:metrics": "node scripts/dev-report-metrics.js",
|
|
@@ -42,5 +68,8 @@
|
|
|
42
68
|
"ajv-formats": "^3.0.1",
|
|
43
69
|
"js-yaml": "^4.1.1",
|
|
44
70
|
"linguistic-enricher": "1.1.35"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"eslint": "^8.57.0"
|
|
45
74
|
}
|
|
46
75
|
}
|