Skip to content

feat: add Nanocodex agent backend - #1461

Merged
roninjin10 merged 21 commits into
smithersai:mainfrom
N0xMare:nox/feat-nanocodex-v1
Aug 11, 2026
Merged

feat: add Nanocodex agent backend#1461
roninjin10 merged 21 commits into
smithersai:mainfrom
N0xMare:nox/feat-nanocodex-v1

Conversation

@N0xMare

@N0xMare N0xMare commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a headless NanocodexAgent backend backed by the pinned smithers-nanocodex v0.0.1 release binary
  • integrate native durable checkpoint publication and fresh-process resume through the generic checkpoint substrate
  • fail closed on unsupported hosts and require the qualified Linux x86_64 Bubblewrap PID-containment profile
  • add strict protocol, process cleanup, cancellation, artifact qualification, facade, documentation, and CI coverage

Stack

This is layer 3 of 3, verified on the exact cumulative ancestry:

  1. 🐛 fix: complete Effect 4 runtime compatibility #1463 — Effect 4 runtime compatibility, 92ca474344a194c188e8a6981ec5e51d907e341e
  2. feat: add durable generic agent checkpoints #1449 — durable checkpoints, f0c287dfb5c0f37f4657d25148c8ef5bc4cb6f30
  3. feat: add Nanocodex agent backend #1461 — Nanocodex, f9a247f9c82033ab2cdaf6034c76e85b0dd35f00

Merge in that order. The GitHub base intentionally remains main because this is a cross-repository PR; its cumulative diff will collapse as the prerequisite layers land.

Verification

  • full agents package: 945 passed, 56 intentional live/platform skips, 0 failed
  • Nanocodex release qualifier: 23/23 under Node and 23/23 under Bun with real Bubblewrap supervision
  • real managed-ChatGPT qualification: fresh turn, distinct-process resume, native Code Mode artifact, cancellation/descendant cleanup, and durable SQLite cold restart all passed (8/8)
  • root, agents, Smithers, and affected upstream typechecks passed
  • declaration, docs, llms, dependency-boundary, Effect-version, lint, and formatting gates passed
  • focused facade/CI contracts, migration, checkpoint, retry/cancellation, and upstream regression suites passed

Fresh CI is required on the published SHA, including Ubuntu 22.04 Bubblewrap shards, coverage, PostgreSQL, Windows, and the pinned v0.0.1 release qualification lane.

The head and dependency SHAs above were re-audited after the final force-with-lease updates.

@roninjin10

Copy link
Copy Markdown
Contributor

Nice! Will rebase and merge this

roninjin10 added a commit to N0xMare/smithers that referenced this pull request Aug 11, 2026
Rebasing smithersai#1461 past the merged smithersai#1463/smithersai#1449 layers dropped the branch's
merge-commit resolutions and left three kinds of residue:

- every new Nanocodex file still imported the pre-rename
  `smithers-orchestrator` / `@smithers-orchestrator/*` specifiers;
- the CI hardening that lived only in a merge commit (workflow-level
  `permissions: contents: read`, `persist-credentials: false` on the
  `test` and `coverage` checkouts) was lost;
- `scripts/qualify-nanocodex-release.{mjs,test.mjs}` regained the
  `downloadArchive` network path the final commit had deleted.

Restore all three so the branch matches the PR head's intent on top of
current main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@roninjin10
roninjin10 force-pushed the nox/feat-nanocodex-v1 branch from 35d89d9 to 1ffb239 Compare August 11, 2026 01:41
N0xMare and others added 21 commits August 10, 2026 19:00
…checkout

Set persist-credentials: false on the nanocodex-release-qualification
lane's actions/checkout so the unaudited, contributor-hosted binary
this lane executes cannot read a GITHUB_TOKEN left in .git/config.

Co-Authored-By: Codex Sol <noreply@openai.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lifies

The install section pointed at a contributor-hosted release binary and claimed
a size/SHA verification that nothing in the repo performs, and the
qualification section described a download step the script does not have.
Direct users to build the pinned source commit exactly as the CI lane does,
demote the prebuilt release binary as unqualified, and describe the script's
real behavior: --archive required, no network, max-size bound then digest
recorded as provenance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fix the pinned-source instructions so they reproduce CI's archive modes, qualify the archive before installation, and pass repository docs style checks. Regenerate all llms bundle mirrors from the corrected source page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Codex Sol <noreply@openai.com>
Co-Authored-By: Codex Sol <noreply@openai.com>
Rebasing smithersai#1461 past the merged smithersai#1463/smithersai#1449 layers dropped the branch's
merge-commit resolutions and left three kinds of residue:

- every new Nanocodex file still imported the pre-rename
  `smithers-orchestrator` / `@smithers-orchestrator/*` specifiers;
- the CI hardening that lived only in a merge commit (workflow-level
  `permissions: contents: read`, `persist-credentials: false` on the
  `test` and `coverage` checkouts) was lost;
- `scripts/qualify-nanocodex-release.{mjs,test.mjs}` regained the
  `downloadArchive` network path the final commit had deleted.

Restore all three so the branch matches the PR head's intent on top of
current main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ent main

`pnpm -C packages/{agents,smithers} build` for the Nanocodex exports and
`pnpm docs:llms` for the bundles. Also restore `docs/llms-full-v0.32.0.txt`
to main: the branch regenerated it while 0.32.0 was the working version, but
that tagged bundle is frozen history now that main is on 0.33.1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rate

smithersai#1449 landed with `onCheckpoint()` recording a `progress` ref and a returned
`result.checkpoint` recording a separate `turn` ref, with no dedupe between
them. NanocodexAgent does both for one turn, so every successful turn writes
two refs to one content hash — the branch's tests still expected the preview's
single row.

- assert the real `["progress", "turn"]` shape (and that no row is ever the
  legacy `smithers.cli-session` codec, which is what the test guards);
- key the Linux-only cold-restart assertions off the progress lineage instead
  of a raw ref count.

Also restore the PR head's `ubuntu-latest` CI contract (the rebase had kept an
earlier 22.04 pin that the final commit reverted), and make the Bubblewrap
probe relax `kernel.apparmor_restrict_unprivileged_userns` before giving up —
on Ubuntu >= 23.10 that sysctl is what denies the namespace, so without this
the containment tests silently skip on ubuntu-latest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rtions

`check-docs.mjs` still asserted OMP hijack is unshipped, but f84c925
shipped the native `omp --resume` launcher and updated
`docs/integrations/cli-agents.mdx` accordingly. The stale assertions made
`node scripts/check-docs.mjs` fail on main and on every PR branched from
it, including this one.

Point the assertions at the shipped behavior and additionally require the
`OmpAgent` hijack row plus the `hijack.js` omp launcher branch, so the
checker tracks the launcher instead of drifting from it again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
main already freezes tagged llms bundles: `check-llms.mjs` checks the local
and remote tag before falling back to npm, and `llms-version-guard.ts` does
the same through `checkVersionRelease`/`hasReleaseTag`. Rebasing this branch
onto that main left a second copy of the probe inside the npm-404 branch of
`checkNpmPublication`.

The duplicate is unreachable in the real path — a tagged version already
returned "published" before npm is consulted — and it regresses two things
when it is reached:

- its `git ls-remote` omits `GIT_TERMINAL_PROMPT=0`, so a remote that asks
  for credentials can block the docs build indefinitely, which is exactly
  what the existing probe guards against;
- it downgrades a genuinely unpublished version to "unavailable" whenever
  `ls-remote` fails for a reason other than "no such ref" (a transient
  network error), silently skipping versioned docs regeneration.

Restore `checkNpmPublication` to the registry-only probe main defines and
keep only the clarifying comments.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@roninjin10
roninjin10 force-pushed the nox/feat-nanocodex-v1 branch from 4646f20 to 2cf72ac Compare August 11, 2026 02:11
@roninjin10
roninjin10 merged commit 52fd9a2 into smithersai:main Aug 11, 2026
16 of 19 checks passed
roninjin10 added a commit that referenced this pull request Aug 11, 2026
Rebasing #1461 past the merged #1463/#1449 layers dropped the branch's
merge-commit resolutions and left three kinds of residue:

- every new Nanocodex file still imported the pre-rename
  `smithers-orchestrator` / `@smithers-orchestrator/*` specifiers;
- the CI hardening that lived only in a merge commit (workflow-level
  `permissions: contents: read`, `persist-credentials: false` on the
  `test` and `coverage` checkouts) was lost;
- `scripts/qualify-nanocodex-release.{mjs,test.mjs}` regained the
  `downloadArchive` network path the final commit had deleted.

Restore all three so the branch matches the PR head's intent on top of
current main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@roninjin10

Copy link
Copy Markdown
Contributor

Merged, as promised. Polish applied on top of your commit with authorship preserved: rebased onto the landed #1449 substrate (imports/migration ids reconciled to the as-landed 0037 checkpoint schema), hardened the release-qualification path (local-archive-only, pinned SHA-256 provenance, everything else reported unverified-input), and verified the macOS fail-closed path empirically. Full local gates green: agents 1055/0, engine 1210/0, db/smithers/driver/observability suites, typecheck/lint/check:dts/check-docs/check-llms. The stack (#1463#1449#1461) is now fully landed — thanks for the disciplined layering, it made verification tractable.

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.

3 participants