@n8r/surface 0.0.0-stage → 0.1.0-experimental.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/LICENSE +202 -0
- package/LICENSE-DOCS +395 -0
- package/LICENSING.md +36 -0
- package/README.md +181 -2
- package/dist/activity.d.ts +16 -0
- package/dist/activity.js +44 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +260 -0
- package/dist/codec.d.ts +4 -0
- package/dist/codec.js +41 -0
- package/dist/codex.d.ts +72 -0
- package/dist/codex.js +510 -0
- package/dist/contracts.d.ts +129 -0
- package/dist/contracts.js +1 -0
- package/dist/html.d.ts +5 -0
- package/dist/html.js +50 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +5 -0
- package/dist/notes.d.ts +52 -0
- package/dist/notes.js +184 -0
- package/dist/portable.d.ts +10 -0
- package/dist/portable.js +71 -0
- package/dist/revisions.d.ts +2 -0
- package/dist/revisions.js +18 -0
- package/dist/settings.d.ts +23 -0
- package/dist/settings.js +100 -0
- package/dist/setup.d.ts +9 -0
- package/dist/setup.js +161 -0
- package/dist/source-tools.d.ts +102 -0
- package/dist/source-tools.js +201 -0
- package/dist/startup.d.ts +7 -0
- package/dist/startup.js +74 -0
- package/dist/surface-draft.d.ts +19 -0
- package/dist/surface-draft.js +95 -0
- package/dist/surface-instructions.d.ts +2 -0
- package/dist/surface-instructions.js +23 -0
- package/dist/surface-store.d.ts +36 -0
- package/dist/surface-store.js +181 -0
- package/dist/validate.d.ts +4 -0
- package/dist/validate.js +184 -0
- package/docs/n8r-surface/README.md +133 -0
- package/docs/n8r-surface/codex-research-transcript.md +51 -0
- package/docs/n8r-surface/codex-research-verification.md +176 -0
- package/docs/n8r-surface/command-outcomes.md +564 -0
- package/docs/n8r-surface/contracts.md +210 -0
- package/docs/n8r-surface/critical-path.md +163 -0
- package/docs/n8r-surface/design.md +289 -0
- package/docs/n8r-surface/getting-started.md +107 -0
- package/docs/n8r-surface/host-contract.md +176 -0
- package/docs/n8r-surface/implementation-decisions.md +96 -0
- package/docs/n8r-surface/npm-distribution.md +137 -0
- package/docs/n8r-surface/npm-release.md +188 -0
- package/docs/n8r-surface/recreation-handoff.md +117 -0
- package/docs/n8r-surface/researcher-discovery.md +157 -0
- package/docs/n8r-surface/researcher-prepared-check.md +117 -0
- package/docs/n8r-surface/researcher-reconciliation-trial.md +149 -0
- package/docs/n8r-surface/researcher-repository-check.md +95 -0
- package/docs/n8r-surface/researcher-skeleton-check.md +84 -0
- package/docs/n8r-surface/researcher-skill-verification.md +725 -0
- package/docs/n8r-surface/researcher-skill.md +255 -0
- package/docs/n8r-surface/researcher-vault.md +134 -0
- package/docs/n8r-surface/save-reopen-transcript.md +211 -0
- package/docs/n8r-surface/save-reopen-verification.md +152 -0
- package/docs/n8r-surface/startup-human-check.md +172 -0
- package/docs/n8r-surface/startup-verification.md +161 -0
- package/docs/n8r-surface/startup.md +151 -0
- package/docs/n8r-surface/surface-revisions-transcript.md +552 -0
- package/docs/n8r-surface/surface-revisions-verification.md +161 -0
- package/docs/n8r-surface/vault-setup-verification.md +210 -0
- package/docs/n8r-surface/verification.md +117 -0
- package/docs/n8r-surface/versioning.md +183 -0
- package/examples/researcher/README.md +92 -0
- package/examples/researcher/composed.surface.json +430 -0
- package/examples/researcher/composed.surface.yaml +283 -0
- package/examples/researcher/harbor-r1.research.html +193 -0
- package/examples/researcher/harbor-r2.research.html +226 -0
- package/examples/researcher/lumen-manual-edit.pending.html +271 -0
- package/examples/researcher/lumen-r1.research.html +271 -0
- package/examples/researcher/lumen-r2.research.html +280 -0
- package/examples/researcher/sources/harbor-api.md +16 -0
- package/examples/researcher/sources/harbor-auth.md +8 -0
- package/examples/researcher/sources/lumen-guide.md +28 -0
- package/examples/researcher/sources/lumen-settings.md +9 -0
- package/package.json +45 -4
- package/plugins/n8r-surface/.codex-plugin/plugin.json +31 -0
- package/plugins/n8r-surface/LICENSE +202 -0
- package/plugins/n8r-surface/LICENSE-DOCS +395 -0
- package/plugins/n8r-surface/LICENSING.md +36 -0
- package/plugins/n8r-surface/assets/icon.svg +5 -0
- package/plugins/n8r-surface/plugin.json +27 -0
- package/plugins/n8r-surface/skills/research/SKILL.md +122 -0
- package/plugins/n8r-surface/skills/research/agents/openai.yaml +4 -0
- package/plugins/n8r-surface/skills/research/references/discovery-map.md +160 -0
- package/plugins/n8r-surface/skills/research/references/model-meanings.md +55 -0
- package/plugins/n8r-surface/skills/research/references/skeleton-surface.md +105 -0
- package/plugins/n8r-surface/skills/research/references/working-notes.md +116 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Partial Surface generation and revision evidence
|
|
2
|
+
|
|
3
|
+
This records the bounded #17 candidate, not human acceptance or completion of
|
|
4
|
+
all #17 scope. Follow the [short tester walkthrough](getting-started.md); the
|
|
5
|
+
[design](../superpowers/specs/2026-11-05-surface-revisions-design.md) and
|
|
6
|
+
[SURFACE-01](command-outcomes.md#surface-01-generate-save-and-revise-a-partial-surface)
|
|
7
|
+
define the intended outcome.
|
|
8
|
+
|
|
9
|
+
## Starting state and actual interaction
|
|
10
|
+
|
|
11
|
+
The installed baseline help on 5 November 2026 advertised Markdown-only saves.
|
|
12
|
+
Structured generation/persistence was an explicitly authorized known missing
|
|
13
|
+
capability. This was not represented as a failed live AI trial.
|
|
14
|
+
|
|
15
|
+
The rehearsal starts with the real Researcher's earlier saved Lumen note, including
|
|
16
|
+
five component IDs, a human decision not to select external OIDC and a later human
|
|
17
|
+
session-expiry priority. The source is the fictional
|
|
18
|
+
[Lumen guide](../../examples/researcher/sources/lumen-guide.md). The agent copied
|
|
19
|
+
that existing note and source into a new local rehearsal directory, recorded their
|
|
20
|
+
bytes and configured a separate test vault. It installed a candidate tarball into
|
|
21
|
+
an isolated prefix with scripts disabled, keeping the normal global installation.
|
|
22
|
+
|
|
23
|
+
Actual interactions through the installed command:
|
|
24
|
+
|
|
25
|
+
1. Reopen the note with the explicitly selected source and renew transmission
|
|
26
|
+
consent. Ask the Researcher to create a partial Surface, retain all five IDs,
|
|
27
|
+
the OIDC non-selection and expiry priority, and show selections and unknowns.
|
|
28
|
+
2. Inspect the host-generated preview; enter `/save surface`, then `/exit`.
|
|
29
|
+
3. Start a fresh process from the saved JSON. Select OIDC because the investigation
|
|
30
|
+
now needs centralized sign-in, explicitly leaving provider identity and runtime
|
|
31
|
+
behavior unknown. Request the updated Surface, save and exit.
|
|
32
|
+
4. Start another fresh process from the successor HTML. Ask which decision changed
|
|
33
|
+
and what remains unknown, then exit without saving.
|
|
34
|
+
|
|
35
|
+
The developing agent supplied those interactions, not prewritten findings or
|
|
36
|
+
structured artefacts. The real Codex Researcher read sources and generated content.
|
|
37
|
+
Independent code read the actual saved files afterward; scripted protocol tests
|
|
38
|
+
are separate evidence.
|
|
39
|
+
|
|
40
|
+
## Probe and reviewed candidate
|
|
41
|
+
|
|
42
|
+
The initial installed probe used product code `f34522f`. It completed all three
|
|
43
|
+
Lumen processes with exit 0. Independent readback verified the five existing IDs,
|
|
44
|
+
OIDC rejected → selected, session-expiry context, exact research references and
|
|
45
|
+
successor lineage. The first definition had no selected edges; the second added
|
|
46
|
+
the declared Lumen → OIDC selection. This is a partial desired composition, not
|
|
47
|
+
runtime configuration or proof of reachability.
|
|
48
|
+
|
|
49
|
+
Review identified two preview-state bugs: an invalid replacement could retain an
|
|
50
|
+
earlier staged candidate, and a Markdown save turn could stage an unshown Surface.
|
|
51
|
+
Both were reproduced with failing tests and fixed at `62cc6d9`. The same commit
|
|
52
|
+
requires evidence basis for every generated entity and retains historical claims,
|
|
53
|
+
notes and question identities. A fresh targeted reviewer verified the fixes and
|
|
54
|
+
ran 19 focused tests without unresolved findings.
|
|
55
|
+
|
|
56
|
+
The probe's script originally sampled checkout HEAD at completion, while review
|
|
57
|
+
work had advanced it. Its local report was corrected to identify the installed
|
|
58
|
+
`f34522f` product code and retain the originally sampled value with an explanation.
|
|
59
|
+
Tarball hashes identify exact installed bytes; a later checkout revision is not
|
|
60
|
+
substituted for the running candidate.
|
|
61
|
+
|
|
62
|
+
## Corrected-candidate rehearsal
|
|
63
|
+
|
|
64
|
+
The complete Lumen cycle passed against product code
|
|
65
|
+
[`62cc6d9`](https://github.com/injectionator/n8r-surface/commit/62cc6d9131badb0a086f3bdb2e3f6bc38f0e14b9)
|
|
66
|
+
on 5 November 2026. All three fresh installed processes exited 0. The independent
|
|
67
|
+
Harbor check also passed through three fresh processes, each exiting 0.
|
|
68
|
+
|
|
69
|
+
| Environment / input | Recorded identity |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| Host | macOS; Node 26.13.0; Codex CLI 0.166.0 |
|
|
72
|
+
| Inference | `gpt-6-astra`, existing ChatGPT sign-in; no provider/API-key fallback |
|
|
73
|
+
| Shared Researcher | 0.1.8; instruction digest `sha256:8af29c3073df9b8210a7dd94ced9700379b0a98f76bd3a2902f9430b93c98a2a` |
|
|
74
|
+
| Host adapter | Structured tool instructions and restrictions at code `62cc6d9` |
|
|
75
|
+
| Installed tarball | SHA-256 `59fde46cfff0f3b9bdba198d6c637891d0102ac46da5870580aab2a620367fdb` |
|
|
76
|
+
| Original note | SHA-256 `76b6abe6d616b903f641f2b8d52f06777ad5383060701ce49a314d3ff68eca52` |
|
|
77
|
+
| Lumen source | SHA-256 `98d3374c79c166b37f0debb4ffb5e457eda1385dd7847b042cbad674cac98693` before and after |
|
|
78
|
+
|
|
79
|
+
The tarball contains the exact code at that revision plus in-progress documentation;
|
|
80
|
+
its hash identifies the installed package. Independent byte comparison confirmed
|
|
81
|
+
all installed built files match the source build. The shared instruction digest
|
|
82
|
+
identifies bundled Researcher instructions; the host adapter code separately
|
|
83
|
+
identifies its structured-output instructions.
|
|
84
|
+
|
|
85
|
+
Independent readback used `readResearchHtml`, `decode`, `verifyReferences`,
|
|
86
|
+
`verifySuccessor` and the host's additional preservation checks. It retained
|
|
87
|
+
`component:lumen`, `component:inference`, `component:archive`, `component:callback`
|
|
88
|
+
and `component:oidc` across both definitions. OIDC changed from rejected to selected
|
|
89
|
+
under the same decision ID; the selected successor adds one declared centralized
|
|
90
|
+
sign-in edge. Provider/model identity and runtime behavior remain unknown.
|
|
91
|
+
|
|
92
|
+
The initial record has 11 findings and one source; its successor has 14 findings
|
|
93
|
+
and two source observations, retaining historical claims and human notes. The
|
|
94
|
+
session-expiry priority survives. Original note, first pair, source and settings
|
|
95
|
+
bytes are unchanged. Reopening the successor HTML retained the changed decision
|
|
96
|
+
without creating a third pair.
|
|
97
|
+
|
|
98
|
+
| Logical object | Digest |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| Initial research | `sha256:a9cc46c071bebffe7048962971ec69d565c9418b6815d8fe0895879a930cc69b` |
|
|
101
|
+
| Initial Surface | `sha256:ebf4cb0e801598ed512555db9f6af03ec21cf3dc204509a78ad6d2dfab81b85c` |
|
|
102
|
+
| Successor research | `sha256:d6630b518b1fb655a9f2132f3ce51993013d966c666dc5b1d37091f466680b53` |
|
|
103
|
+
| Successor Surface | `sha256:8b3c84e590851b234be05c853ad2b5b63c1f641778995f33812151ccf96aa43d` |
|
|
104
|
+
|
|
105
|
+
Parent references match the exact initial identities, revisions and logical digests;
|
|
106
|
+
manifest hashes match independently read file bytes. Raw terminal logs, original
|
|
107
|
+
inputs, tarball and readback reports remain in the selected local vault's `runs/`
|
|
108
|
+
folder; no machine-specific location is published.
|
|
109
|
+
|
|
110
|
+
The independent Harbor trial used the fictional
|
|
111
|
+
[interface notes](../../examples/researcher/sources/harbor-api.md). The Researcher
|
|
112
|
+
created a Markdown note, then reopened it to generate a pair, then reopened the
|
|
113
|
+
pair's HTML in another fresh process. Independent readback confirmed ten findings,
|
|
114
|
+
three stable IDs (`urn:harbor:archive`, `urn:harbor:intake-client`,
|
|
115
|
+
`urn:harbor:callback-receiver`), deferred callback selection and explicit unknown
|
|
116
|
+
authentication/compatibility. Source, note and settings bytes remained unchanged.
|
|
117
|
+
This is a smaller second-product check, not a Harbor integration or deployment trial.
|
|
118
|
+
|
|
119
|
+
The [actual sanitized transcript](surface-revisions-transcript.md) preserves the
|
|
120
|
+
six installed conversations, prompts, source tool output, previews and save paths
|
|
121
|
+
with machine-specific path prefixes replaced. Spinner frames are omitted. The
|
|
122
|
+
complete logs and readback retain their original bytes locally.
|
|
123
|
+
|
|
124
|
+
## Automated supporting checks
|
|
125
|
+
|
|
126
|
+
At `62cc6d9`, 115 Node tests and the installed-package check passed. New tests cover
|
|
127
|
+
host-owned references, invalid structured input, immutable pair history, original
|
|
128
|
+
note/predecessor conflicts, malformed manifests, symlink ancestry, relocated pairs,
|
|
129
|
+
publication failure, missing historical sources, context bounds, validation repair,
|
|
130
|
+
failed turns and stale/unshown preview rejection. The package test uses a scripted
|
|
131
|
+
Codex process; it is not evidence of model reasoning.
|
|
132
|
+
|
|
133
|
+
The full 115-test suite and installed-package check also passed separately on
|
|
134
|
+
Node 22.23.2, 24.22.2 and 26.13.0. `npm ci` and `npm cache add yaml@2.9.1` prepared
|
|
135
|
+
the dependency cache; package consumer installation used offline mode with scripts
|
|
136
|
+
disabled. Final Markdownlint 0.24.0, offline Lychee 0.24.2, cffconvert 2.0.0,
|
|
137
|
+
shell syntax, 24 Python tests and whitespace checks passed. All six GitHub checks
|
|
138
|
+
also passed at code `62cc6d9`; later documentation commits have their own CI runs.
|
|
139
|
+
|
|
140
|
+
## Storage and remaining limits
|
|
141
|
+
|
|
142
|
+
Each numbered directory contains research HTML, Surface JSON and a host manifest
|
|
143
|
+
with byte hashes/provenance. The host validates and reads back all members. The
|
|
144
|
+
Surface pins the research logical revision/digest; successors pin their own
|
|
145
|
+
predecessors. The manifest is storage metadata, not a second model or authenticity
|
|
146
|
+
proof. Original Markdown notes and earlier pairs remain available.
|
|
147
|
+
|
|
148
|
+
Reopening requires an intact host-created pair and renewed source/transmission
|
|
149
|
+
consent. It supports one research record per pair, bounded to 512 KiB of transmitted
|
|
150
|
+
context. Arbitrary multi-record imports, automatic reconciliation of manually edited
|
|
151
|
+
HTML, deliberate component deletion/migration and YAML generation are outside this
|
|
152
|
+
increment. Directory topology must remain stable during synchronous filesystem
|
|
153
|
+
operations; no adversarial concurrent-filesystem guarantee is claimed.
|
|
154
|
+
|
|
155
|
+
The host checks structure, references and selected preservation rules. Interpretation
|
|
156
|
+
of prose, human intent and source meaning still needs review. Missing detail does
|
|
157
|
+
not establish absence. Declared edges do not establish reachability or exercised
|
|
158
|
+
behavior. These trials do not establish universal model conformance, consumer
|
|
159
|
+
compatibility, Lab recreation, external-host lifecycle or registry distribution.
|
|
160
|
+
The package remains private; npm work is last and separate. Human acceptance of
|
|
161
|
+
this increment is pending, and #17 remains open.
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Vault setup: maintainer verification record
|
|
2
|
+
|
|
3
|
+
**Installing or trying the command? Start with
|
|
4
|
+
[Install and choose your vault](getting-started.md).**
|
|
5
|
+
The procedures below are for maintainers recording isolated test evidence; they
|
|
6
|
+
are not prerequisites for using the command.
|
|
7
|
+
|
|
8
|
+
## Intent and expected result
|
|
9
|
+
|
|
10
|
+
Given an installed candidate, an empty isolated home and a source directory
|
|
11
|
+
outside the proposed vault, run `n8r-surface`, press Enter, then enter `y`.
|
|
12
|
+
Expect exit 0, a saved version-1 `vaultRoot`, and `research/`, `artifacts/`,
|
|
13
|
+
`surfaces/` under that vault. Independently open settings/folders and compare
|
|
14
|
+
source bytes. Run again from a second source directory: expect the same vault,
|
|
15
|
+
no question, exit 0 and unchanged settings/vault contents.
|
|
16
|
+
|
|
17
|
+
With another empty home and closed input, expect the setup-required message,
|
|
18
|
+
exit 1 promptly and no writes. No research, runner, scanning or findings are
|
|
19
|
+
part of this result. See [the exact contract](startup.md) and
|
|
20
|
+
[approved plan](../superpowers/plans/2026-11-05-standalone-vault.md).
|
|
21
|
+
|
|
22
|
+
## Baseline actually observed
|
|
23
|
+
|
|
24
|
+
On 5 November 2026, a clean tarball at
|
|
25
|
+
`6c88ffb8fd325df0421f9291c81776a892b2bdc1` was built and installed offline outside
|
|
26
|
+
the checkout. Environment: macOS 26.6.2 ARM64, Node 26.13.0. Two empty isolated
|
|
27
|
+
homes and a synthetic source containing `README.md` were prepared.
|
|
28
|
+
|
|
29
|
+
Both real-terminal and closed-input `n8r-surface` runs exited **2**, reported the
|
|
30
|
+
missing legacy `n8r/artefacts` corpus (`ENOENT`) and said setup was unimplemented.
|
|
31
|
+
No question appeared. Independently enumerated homes remained empty and source
|
|
32
|
+
bytes were unchanged. **Fail** against the new setup intent; successful baseline
|
|
33
|
+
observation. This supersedes the earlier missing-executable blocker, without
|
|
34
|
+
claiming any baseline setup success.
|
|
35
|
+
|
|
36
|
+
## Candidate observations
|
|
37
|
+
|
|
38
|
+
Product/test revision: `ebcb4b7eea1029ef013aa4a82f01195c4548a913`, stacked
|
|
39
|
+
on the unmerged planning PR #31 at `6c88ffb`. Agent rehearsal on 5 November 2026,
|
|
40
|
+
macOS 26.6.2 ARM64; no human acceptance is claimed.
|
|
41
|
+
|
|
42
|
+
| Runtime | Full suite | Installed process checks | Installed terminal interactions | Library consumer |
|
|
43
|
+
| --- | --- | --- | --- | --- |
|
|
44
|
+
| Node 22.23.2 | 74 passed | 25 passed | 18 passed | Passed |
|
|
45
|
+
| Node 24.22.2 | 74 passed | 25 passed | 18 passed | Passed |
|
|
46
|
+
| Node 26.13.0 | 74 passed | 25 passed | 18 passed | Passed |
|
|
47
|
+
|
|
48
|
+
Each `npm test` and `npm run check:package` exited 0, with no failed/skipped tests.
|
|
49
|
+
The package check installed a tarball outside the checkout and executed the bin.
|
|
50
|
+
The full suite's terminal case repeats the same 18 interactions against the build.
|
|
51
|
+
|
|
52
|
+
The human task list below was separately rehearsed through a disposable installed
|
|
53
|
+
candidate on Node 26.13.0, using a real terminal and manually supplied Enter/`y`:
|
|
54
|
+
|
|
55
|
+
| Task | Actual observation and independent readback | Agent result |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| First use | Location then confirmation appeared; Enter/`y` printed `Vault ready:` and exited 0. | Pass |
|
|
58
|
+
| Open saved state | Parsed/read JSON contained exactly `version: 1` and absolute `vaultRoot`; directory listing showed `research`, `artifacts`, `surfaces`. | Pass |
|
|
59
|
+
| Another source directory | Same vault, no question, exit 0. Recursive before/after home comparison exited 0; both source comparisons exited 0. | Pass |
|
|
60
|
+
| Closed input, empty home | Exact setup-required line, exit 1 promptly; independent directory enumeration found zero entries. | Pass |
|
|
61
|
+
|
|
62
|
+
The automated interactions additionally exercised custom relative paths with
|
|
63
|
+
spaces, retained legacy/unknown settings, repair without settings modification,
|
|
64
|
+
refusal, EOF and SIGINT at both questions, and an external edit before acceptance.
|
|
65
|
+
The final review added installed checks for legacy-corpus overlap refusal and
|
|
66
|
+
safe/unsafe resolved root symlinks.
|
|
67
|
+
Transaction tests exercised deterministic publication conflicts/failures and a
|
|
68
|
+
second real process while the first held the lock. None of this is AI research
|
|
69
|
+
or proof of safety against writers outside the documented boundary.
|
|
70
|
+
|
|
71
|
+
Supporting repository checks: 24 Python fixture/workflow tests, Bash syntax,
|
|
72
|
+
Markdownlint 0.24.0 (56 files), cffconvert 2.0.0 and whitespace checks passed.
|
|
73
|
+
Lychee 0.24.2 passed for all tracked Markdown (zero errors). The exact
|
|
74
|
+
broad `**/*.md` invocation failed on 15 pre-existing links in an ignored local
|
|
75
|
+
evidence folder. That unrelated material was left unchanged; the broad command
|
|
76
|
+
is not reported as passing.
|
|
77
|
+
|
|
78
|
+
Fresh-context code review found three Important preservation/reuse failures:
|
|
79
|
+
legacy overlap, unknown numeric literal loss, and controls introduced by path
|
|
80
|
+
resolution. Each received a failing regression before the fix; the final suite
|
|
81
|
+
and installed matrix above were repeated after all fixes. No Critical or Minor
|
|
82
|
+
findings were reported, and none were deferred. The final pass retains the
|
|
83
|
+
approved setup-only and concurrency boundaries; it is not approval to merge.
|
|
84
|
+
|
|
85
|
+
Public output is sanitized; exact temporary paths and raw local evidence remain
|
|
86
|
+
outside tracked files. No real deployment data was used.
|
|
87
|
+
|
|
88
|
+
## Installation-guide rehearsal
|
|
89
|
+
|
|
90
|
+
On 5 November 2026, the documentation follow-up exercised the exact three npm
|
|
91
|
+
commands in [the getting-started guide](getting-started.md): `npm ci`, `npm pack`,
|
|
92
|
+
and global installation of the generated local tarball. All exited 0. Only npm's
|
|
93
|
+
global prefix was redirected to a temporary directory; the normal installation
|
|
94
|
+
was untouched. The installed bin then passed all 18 terminal interactions under
|
|
95
|
+
isolated homes on Node 26.13.0. This verifies the local-package installation route,
|
|
96
|
+
not npm registry publication or human acceptance.
|
|
97
|
+
|
|
98
|
+
## Maintainer preparation
|
|
99
|
+
|
|
100
|
+
Use a POSIX macOS/Linux terminal with Bash or zsh, Node 22, 24 or 26, npm and
|
|
101
|
+
Python 3.9+. The recorded environment is macOS; Linux and Windows are not local
|
|
102
|
+
acceptance claims. No account or AI credentials are needed. Start in this PR's
|
|
103
|
+
checkout, after preserving unrelated work. Record `git rev-parse HEAD`,
|
|
104
|
+
`node --version` and the operating system. Do not use a real user home as the
|
|
105
|
+
fixture or delete existing settings.
|
|
106
|
+
|
|
107
|
+
Build/install a disposable candidate, prepare two small sources, and define a
|
|
108
|
+
shell wrapper that gives only the installed command the isolated home:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
npm ci && npm cache add yaml@2.9.1 && npm run build
|
|
112
|
+
n8r_verify=$(mktemp -d "${TMPDIR:-/tmp}/n8r-vault-review.XXXXXX")
|
|
113
|
+
n8r_verify=$(cd "$n8r_verify" && pwd -P)
|
|
114
|
+
npm pack --ignore-scripts --pack-destination "$n8r_verify"
|
|
115
|
+
npm install --prefix "$n8r_verify/install" --offline --ignore-scripts --no-audit --no-fund "$n8r_verify/n8r-surface-0.0.0-experimental.1.tgz"
|
|
116
|
+
mkdir -p "$n8r_verify/home" "$n8r_verify/closed-home" "$n8r_verify/source" "$n8r_verify/source-two"
|
|
117
|
+
printf 'Synthetic source bytes.\n' > "$n8r_verify/source/README.md"
|
|
118
|
+
printf 'Second source bytes.\n' > "$n8r_verify/source-two/README.md"
|
|
119
|
+
cp -R "$n8r_verify/source" "$n8r_verify/source-before"
|
|
120
|
+
cp -R "$n8r_verify/source-two" "$n8r_verify/source-two-before"
|
|
121
|
+
n8r-surface() { env HOME="$n8r_verify/home" "$n8r_verify/install/node_modules/.bin/n8r-surface" "$@"; }
|
|
122
|
+
cd "$n8r_verify/source"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Every preparation command must exit 0. npm preparation downloads dependencies;
|
|
126
|
+
the local tarball installation uses the prepared cache. The command's own setup
|
|
127
|
+
has no network activity. No vault/settings files are prepared on its behalf.
|
|
128
|
+
|
|
129
|
+
## Tester task list
|
|
130
|
+
|
|
131
|
+
- [ ] In that prepared terminal, run `n8r-surface`. Expect configuration and legacy
|
|
132
|
+
corpus information, followed by `Vault directory [~/n8r/]:`. Press Enter. Expect
|
|
133
|
+
the resolved path and `Create vault folders and save this location? [y/N]`.
|
|
134
|
+
Enter `y`. Expect `Vault ready:` with that path. Run `echo $?`: expect **0**.
|
|
135
|
+
- [ ] Open the reported settings file and vault in your editor/file browser.
|
|
136
|
+
Expect `version: 1`, absolute `vaultRoot`, and the three directories `research`,
|
|
137
|
+
`artifacts`, `surfaces`. No legacy `artefacts` directory is promised or created.
|
|
138
|
+
Open the source folder: its original `README.md` should remain the only file.
|
|
139
|
+
- [ ] Before reuse, the maintainer takes the readback snapshot described below.
|
|
140
|
+
Run `cd "$n8r_verify/source-two"`, then `n8r-surface`. Expect the same vault,
|
|
141
|
+
no question, and `echo $?` showing **0**. No research has begun.
|
|
142
|
+
- [ ] Run the following closed-input case. Expect prompt return (within five
|
|
143
|
+
seconds), the exact setup-required line below and exit **1**. The maintainer
|
|
144
|
+
verifies the second home is still empty.
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
env HOME="$n8r_verify/closed-home" "$n8r_verify/install/node_modules/.bin/n8r-surface" </dev/null
|
|
148
|
+
echo $?
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
Vault setup required; run n8r-surface in an interactive terminal.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Report:** Pass / Fail / Blocked for each task, candidate commit, Node/OS, the
|
|
156
|
+
interaction attempted, visible result and settings/folders inspected. Paths,
|
|
157
|
+
PID and observation timestamp vary; directory names and exit codes do not.
|
|
158
|
+
Missing folders, forgotten settings, changed source bytes or waiting on closed
|
|
159
|
+
input are failures. Human acceptance is separate from the agent rehearsal.
|
|
160
|
+
|
|
161
|
+
## Maintainer readback and cleanup
|
|
162
|
+
|
|
163
|
+
Immediately after first setup, before reuse:
|
|
164
|
+
|
|
165
|
+
```sh
|
|
166
|
+
cp -R "$n8r_verify/home" "$n8r_verify/home-after-setup"
|
|
167
|
+
cat "$n8r_verify/home/.n8r/n8r-surface.json"
|
|
168
|
+
ls -la "$n8r_verify/home/n8r"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
After all tester tasks:
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
diff -r "$n8r_verify/home-after-setup" "$n8r_verify/home"
|
|
175
|
+
diff -r "$n8r_verify/source-before" "$n8r_verify/source"
|
|
176
|
+
diff -r "$n8r_verify/source-two-before" "$n8r_verify/source-two"
|
|
177
|
+
ls -A "$n8r_verify/closed-home"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Expect all three diffs to exit 0 with no output and the final listing to be empty.
|
|
181
|
+
These checks independently inspect actual command-created state. The automated
|
|
182
|
+
PTY harness also compares settings modification time on reuse/repair.
|
|
183
|
+
Keep the dedicated folder until evidence is reviewed. Optional cleanup:
|
|
184
|
+
|
|
185
|
+
```sh
|
|
186
|
+
cd "$n8r_verify/.."
|
|
187
|
+
unset -f n8r-surface
|
|
188
|
+
rm -r -- "${n8r_verify:?}"
|
|
189
|
+
unset n8r_verify
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Only this dedicated test environment is removed. The checkout's ignored build
|
|
193
|
+
and dependencies remain. Never apply this cleanup to a real home or source.
|
|
194
|
+
|
|
195
|
+
## Supporting checks and limits
|
|
196
|
+
|
|
197
|
+
`npm test` includes real terminal interactions and deterministic transaction tests.
|
|
198
|
+
`npm run check:package` installs a tarball outside the checkout, runs the library
|
|
199
|
+
consumer, closed-input process checks and terminal interactions. Conflict tests
|
|
200
|
+
inject filesystem interleavings, including an exclusive-link race, a second real
|
|
201
|
+
setup process under the first process's lock, detected external edits, publication
|
|
202
|
+
failure and partial-folder retry. They do not establish arbitrary-writer safety.
|
|
203
|
+
|
|
204
|
+
The [concurrency boundary](startup.md#concurrency-and-recovery-boundary) requires
|
|
205
|
+
cooperating setup processes and no external edits during confirmed setup. Stable
|
|
206
|
+
path topology, local filesystem semantics and ordinary process completion are
|
|
207
|
+
assumed. Power loss, hostile filesystem mutation, network filesystems and Windows
|
|
208
|
+
are not verified. A killed process may leave a lock and empty directories.
|
|
209
|
+
The tarball stays private; no registry installation/release, research, continuation,
|
|
210
|
+
SOURCE-01, Lab integration or full #16/#30 completion is claimed.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Experimental contract verification record
|
|
2
|
+
|
|
3
|
+
This record applies the [intent/outcome approach](command-outcomes.md) to the
|
|
4
|
+
library delivered by #15. It records observed library behavior and its limits;
|
|
5
|
+
this historical library record does not verify command or AI research outcomes.
|
|
6
|
+
The later [STARTUP-01 record](startup-verification.md) separately verifies bare startup.
|
|
7
|
+
|
|
8
|
+
- Date: 4 November 2026.
|
|
9
|
+
- Implementer/verifier: Codex, with a separate read-only agent review of the
|
|
10
|
+
implementation at `a2dae4d`. Human product acceptance remains separate.
|
|
11
|
+
- Baseline for the final correction: `ee56e45`.
|
|
12
|
+
- Corrected implementation and test revision: `64b8c95`.
|
|
13
|
+
- Environment exercised: macOS ARM64 (`darwin/arm64`); Node.js 22.23.2, 24.22.2
|
|
14
|
+
and 26.13.0. Other operating systems were not exercised.
|
|
15
|
+
- Distribution: `n8r-surface` version `0.0.0-experimental.1`, local tarball installed
|
|
16
|
+
into a temporary consumer directory with no checkout-relative imports. The
|
|
17
|
+
package remains private and unpublished.
|
|
18
|
+
|
|
19
|
+
## ARRAY-01: a consumer must not silently lose extension data
|
|
20
|
+
|
|
21
|
+
**State X:** a valid research record contains `['original']` in an extension,
|
|
22
|
+
constructed as an Array subclass with an inherited `toJSON` method returning
|
|
23
|
+
`['replacement']`. Additional cases use inherited `toJSON` and `map` getters on
|
|
24
|
+
custom array prototypes. These values violate the intended plain-data boundary.
|
|
25
|
+
|
|
26
|
+
**Input Y:** submit the record through the public validation, logical digest and
|
|
27
|
+
JSON/YAML encoding APIs. For encoding, reopen any returned string to inspect its
|
|
28
|
+
actual value. Repeat the encoding rejection check from the installed package.
|
|
29
|
+
|
|
30
|
+
**Expected Outcome Z:** reject the custom prototype before any inherited method
|
|
31
|
+
or getter runs, leave the caller's original value unchanged, and return no encoded
|
|
32
|
+
artefact or misleading digest. Ordinary arrays must still round trip normally.
|
|
33
|
+
|
|
34
|
+
**Observed baseline:**
|
|
35
|
+
|
|
36
|
+
| Operation | Input value | Reopened output | Digest agrees with input? |
|
|
37
|
+
| --- | --- | --- | --- |
|
|
38
|
+
| JSON encode/decode | `original` | `replacement` | No |
|
|
39
|
+
| YAML encode/decode | `original` | `replacement` | No |
|
|
40
|
+
|
|
41
|
+
The new regression failed against the baseline (22 of 23 tests passed). The
|
|
42
|
+
independently installed package also failed the expected-rejection assertion.
|
|
43
|
+
This confirms an observable data-loss bug, rather than an implementation-style
|
|
44
|
+
preference or an unexercised review suggestion.
|
|
45
|
+
|
|
46
|
+
**Change:** the portable-value boundary now requires an array's prototype to be
|
|
47
|
+
exactly the ordinary `Array.prototype`, before traversing or serializing it.
|
|
48
|
+
Non-array objects keep their existing plain-object rule.
|
|
49
|
+
|
|
50
|
+
**Verification and actual result:** the public APIs now report `requires a plain
|
|
51
|
+
array`. Regression assertions observe zero inherited-hook calls and the unchanged
|
|
52
|
+
`original` value. Both installed JSON/YAML encoding paths reject the subclass.
|
|
53
|
+
Existing normal-array, unknown-extension, HTML and graph round trips remain green.
|
|
54
|
+
All 23 tests and the installed consumer check pass on each of the three Node
|
|
55
|
+
versions above.
|
|
56
|
+
|
|
57
|
+
**Assessment:** passed for this library boundary. It is not a sandbox for arbitrary
|
|
58
|
+
JavaScript execution or proof that the future command can research a repository.
|
|
59
|
+
|
|
60
|
+
## CONTRACT-01: retain useful, attributable research and selected definitions
|
|
61
|
+
|
|
62
|
+
**State X:** the frozen [Lumen and Harbor fixtures](../../examples/researcher/README.md)
|
|
63
|
+
include supplied source documents, original and successor HTML records, a manually
|
|
64
|
+
edited pending file and equivalent JSON/YAML selected definitions. They are
|
|
65
|
+
synthetic, authored acceptance fixtures, not outputs of an AI Researcher.
|
|
66
|
+
|
|
67
|
+
**Input Y:** load the actual fixture bytes through the exported readers, verify
|
|
68
|
+
source hashes and exact research references, validate successor links, and reopen
|
|
69
|
+
both graph encodings. Repeat from assets bundled in the installed tarball.
|
|
70
|
+
|
|
71
|
+
**Expected and observed Outcome Z:**
|
|
72
|
+
|
|
73
|
+
| Required outcome | Independent check and observed result |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| Evidence is attributable to the supplied source snapshots. | Hash original source-file bytes independently; compare with record digests. All match. |
|
|
76
|
+
| Conflicting/unknown facts remain useful. | Read both batch-limit claims (10 and 25), the unknown model version and initial unknown Harbor authentication. All remain explicit. |
|
|
77
|
+
| A manual visible edit cannot silently replace or disappear behind structured data. | The pending HTML is rejected; the reviewed successor loads, records the selected callback decision and points to the intact predecessor. |
|
|
78
|
+
| A second source can add knowledge without losing identity. | Harbor r2 retains its authentication finding ID and original source while adding the second source and supported authentication value. |
|
|
79
|
+
| Selected graph meaning survives conversion. | JSON and YAML reopen to equal values with four nodes, six declared relationships, a shared identity node, a cycle, distinct parallel edges, requirements and exact research revision links. |
|
|
80
|
+
| Installed consumers receive the necessary code and assets. | The temporary consumer imports built exports, reads bundled fixtures/contracts and repeats reference, successor, codec and conflict checks successfully. |
|
|
81
|
+
|
|
82
|
+
**Assessment:** passed for these frozen examples and supported profile meanings.
|
|
83
|
+
Reference integrity does not verify that arbitrary prose is true, a consumer
|
|
84
|
+
understands an extension or any selected connection actually works.
|
|
85
|
+
|
|
86
|
+
## Reproduce the supporting checks
|
|
87
|
+
|
|
88
|
+
From the repository, using a supported Node version:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
npm ci
|
|
92
|
+
npm test
|
|
93
|
+
npm run check:package
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The first command obtains dependencies from npm. The tests and package consumer
|
|
97
|
+
check then work offline; the latter uses the populated dependency cache and removes
|
|
98
|
+
its temporary directory. To use already installed Node executables for the package
|
|
99
|
+
matrix, follow the [contributor instructions](../../CONTRIBUTING.md#researcher-contract-library).
|
|
100
|
+
|
|
101
|
+
The regression lives in [contracts.test.mjs](../../tests/contracts.test.mjs); the
|
|
102
|
+
independent consumer interaction is [package-smoke.mjs](../../tests/package-smoke.mjs),
|
|
103
|
+
invoked outside the checkout by [check-package.mjs](../../scripts/check-package.mjs).
|
|
104
|
+
The fixture expectations are in [fixtures.test.mjs](../../tests/fixtures.test.mjs).
|
|
105
|
+
These files retain the exact reproducible assertions; no private paths or raw
|
|
106
|
+
machine logs are needed in the public evidence record.
|
|
107
|
+
|
|
108
|
+
## Product proof still required
|
|
109
|
+
|
|
110
|
+
The command inventory and State/Input/Outcome method are approved. E2E-01 and
|
|
111
|
+
E2E-02 remain **not attempted**, because discovery, the Researcher instruction
|
|
112
|
+
bundle and runner are not implemented. The first #16 increment separately
|
|
113
|
+
[verifies bare startup](startup-verification.md); status/source/storage behavior
|
|
114
|
+
still needs installed-command evidence. #17 must demonstrate the whole real-runner path,
|
|
115
|
+
human decisions and actual saved/reopened outputs. LibreChat and external skill
|
|
116
|
+
claims need their own actual rehearsals. Lab compatibility needs a named consumer
|
|
117
|
+
trial. None of these claims follows from the passing library checks above.
|