Matiz modular ANN lab
This standalone Node/Python workspace extracts Matiz-derived ANN building blocks
and applies the same neural core and supervised harness to two meaningful tasks:
service repair and typed arithmetic job routing. The playable Network Guardian
and twenty-room dungeon are separate applications.
Task A extraction has passed exact same-runtime initialization, prediction,
gradient, Adam, training, evaluation and proposal checks against the frozen
ANN-01 baseline. Task B completed six actual routing arms and composition
completed ten arms with component removals; the source-bound receipts underartifacts/ record the verified scope. Those historical demonstrations have bounded Claude acceptance. The V6 successor
addresses the next hardened review findings and has local verification; its final
exact-source review is pending.
Building blocks
flowchart LR
A[Task A: observations and repair meanings] --> H[Shared harness]
B[Task B: observations and routing meanings] --> H
H --> N[Configurable numerical MLP]
H --> C[Semantically bound checkpoints]
H --> T[Shared supervised trainer and evaluator]
H --> P[Task-specific proposals]
P --> K[Independent role and effect kernel]
K --> W[Owned HTTP workers]
W --> V[Independent arithmetic and deadline witness]| Module | Shared or task-specific responsibility |
|---|---|
core/numerical.mjs | Dimension-configurable two-layer ReLU MLP, categorical head, gradients and Adam |
core/harness.mjs | Roles, masks, fitting, raw/masked evaluation, checkpoint compatibility and cloning |
adapters/task-a/ | Original public-probe encoder, repair teacher, target decoder and shared-budget trimming |
adapters/task-b/spec.mjs | Job/queue encoder, routing/defer meanings, rules and round-robin baselines |
runtime/ | Newly owned workers, typed queue, independent referee, scoped effect admission and cleanup |
composition/workflow.mjs | Frozen bundle identity, typed handoffs, stale/duplicate/conflict rejection and resource reservations |
contracts/composition-protocol.v1.json | Predeclared scenarios, ablations, numerical tolerance and claim limits |
The generic core does not depend on repair labels or routing features. Both
adapters currently use 32 inputs and four outputs, but those numbers do not make
their checkpoints interchangeable. Tests also exercise a seven-input,
five-output task using the same numerical/training interfaces.
Each checkpoint binds the ordered observations, action meanings, timing,
normalization, role/target order, model layout, trainer and adapter contracts.
Source digests complement these contracts. The shared inference path rejects
unbound raw teams. An explicit Task A migration accepts only the two pinned
fresh/trained ANN-01 artifact values. Changing a domain name on another weights
file cannot establish compatibility.
Generic checkpoint loading validates meanings and tensor shape. A release must
also verify the externally expected artifact/bundle digest: valid finite weight
edits are different artifacts, not automatically corrupt tensors. Composition
uses a separately supplied bundle identity, frozen active model snapshots and
checks the used weights against that bundle.
Run and inspect
Use Node and Python 3. No paid service, GPU or third-party runtime dependency is
required. The exact Task A reproduction receipt records Node/V8/platform/arch;
another runtime cannot inherit its zero-tolerance verdict.
npm run test:core
npm run test:routing
node --test tests/composition/*.test.mjs
node scripts/verify-task-a.mjs --output /absolute/new/task-a-receipt.json
node scripts/verify-task-b.mjs --output /absolute/new/task-b-receipt.json
node scripts/verify-composition.mjs /absolute/new/composition-outputOutput paths must be new: keep failed runs and earlier receipts. Each routing
or composition verification owns its supervisor and three freshly launched
loopback HTTP workers, and closes them after the run. It does not reset the
network game on port 8787. Source changes invalidate an older receipt; inspect
the recorded source hashes before relying on it.
For a copied package, Task A verification accepts --baseline pointing to the
frozen ANN-01 capture directory. Composition accepts the same option after its
output directory. The numerical and routing modules themselves do not require
that sibling directory; the reference is used to verify prior behavior and load
the exact reviewed repair artifact.
The current check set is thirteen core tests, nine routing tests, four composition
contract tests and eighteen release witness/lifecycle tests. Earlier counts and
receipts remain historical. artifacts/task-a-hardening-v1/receipt.json additionally
verifies 1,350 full fresh/fitted/candidate decisions and the private team-ownership
discipline, while preserving the exact original 350-update trained weights.
Execution, cloning and export require teams owned by that harness instance.
Checkpoint JSON remains data until explicitly imported withimportCheckpoint(envelope, { expectedContentDigest }). The expected identity
must come from trusted artifact approval. Hashing untrusted data and supplying
its own hash does not establish approval. The registry supplies approved identities
from the complete captured payload; the checkpoint serializer is canonical JSON,
which differs from a pretty-printed file's byte SHA256.
artifacts/TASK-B-VERIFICATION.json retains six arms, 72 jobs and eight typed
admission negatives. Correct on-time totals were 8/24 for round-robin, 24/24 for
rules and 0/24 for a fresh neural router. The fresh neural result is retained,
not treated as learned routing.
artifacts/composition-v1/ retains all ten runs and 120 jobs. Across its two seeds:
| Composition arm | Correct on-time jobs | Shared action cost |
|---|---|---|
| Observer + recovery + rules router | 24/24 | 122 |
| Observer removed | 6/24 | 24 |
| Recovery removed | 10/24 | 86 |
| Observer + recovery + round-robin router | 22/24 | 122 |
| Observer + recovery + fresh neural router | 20/24 | 125 |
This demonstrates bounded component contribution on the declared fixed fault
schedule. It is not a generalization or model-promotion result. The repair
checkpoint was frozen from the prior ANN-01 capture; the router was not fitted.
Each composition control advances the shared logical step once, separately from
a route/defer step; this does not reproduce the original game's entire mission
clock. Queue waiting and real request latency remain distinct measurements.
Task B holds bounded integer jobs in a queue. Its router can dispatch the current
job to alpha, beta or gamma, or defer once. The backend checks role, fixed target,
job identity, current revision and shared budget before effects. It records
correct, wrong, late, unreachable and malformed responses separately. Deadlines
cover request start through response parsing; queue waiting is explicitly
excluded. Dispatch does not secretly repair a failed service or substitute an
answer computed by the referee.
Task A observer/repair permissions and authored fault controls are separate
capability handles. Router code receives no repair or operator handle. Private
scope grants stay on the creator's subprocess pipe and out of public observations
and evidence. This is a trusted single-operator lab, not independent multi-user
authentication or hostile-code isolation.
Learning and evolution
The frozen Task A checkpoint is supervised repair-rule imitation. Exact
extraction checks establish preservation of that behavior, not a fresh learning
improvement. Task B has rules, round-robin and fresh neural references; learned
routing is not yet claimed. Raw decisions, deterministic masks, action decoders
and actual effects are distinct measurements.
The architecture supports configurable input/output dimensions and hidden
width. It does not yet search its own architecture. Inference checkpoints do
not export optimizer, RNG or data-position state, so fitting is a fresh run,
not proven resumable training. The value head remains untrained.
The delivery plan continues with protected multi-seed/multi-initialization
comparisons, prior-task retention, a bounded width successor and one independently
reviewed harness successor. The local registry implementation below has bounded
verification; its final review status belongs to the current execution tracker,
not historical receipts. The full plan and tracker live in ../matiz-feedback/.
The compiler was not run; this follows manually decomposed, reviewed packets.
Composition rollback restores model/software bundles. It cannot undo completed
jobs or service effects; those need separate reconciliation. Two tasks in this
lab establish local reuse only. Portability to another domain and production
network defense need additional adapters, authority and outcome evidence.
Complete local releases and rollback
release/registry.mjs stores content-addressed payloads containing every executable
dependency, both semantic checkpoints, mission configuration, protocol and
regression evidence. runtime/audit_journal.py is an executable dependency and is
included in source identity. A separate release descriptor binds the payload to
its evaluation and fixed local authority; this avoids circular artifact IDs.
The coordinator pins complete approved artifact IDs (including model/config),
allowed source snapshots, expected evaluation IDs, every numerical/runtime
regression source pin and the release control-plane source before
evaluation. This gate measures compatibility and lifecycle behavior. Its six
fixed routed jobs do not measure how well a learned policy routes: the evaluator
directly dispatches prescribed healthy, corrupt, delayed and stopped cases.
The stopped case consumes a job without an HTTP request. The recipe is incontracts/release-protocol.v1.json.
node --test tests/release/*.test.mjs
node scripts/verify-release.mjs --prepare /absolute/new-release-proof
# Review and externally anchor plan.json before effectful execution.
node scripts/verify-release.mjs --execute /absolute/new-release-proof EXPECTED_PLAN_FILE_SHA256Preparation creates complete source/model snapshots without starting processes.
Execution launches six newly owned ranges and closes them. Every path must be new;
failed and superseded receipts are retained. artifacts/release-v6/ is the current
verified successor: fourteen lifecycle/integrity/approval checks, twelve gate route
attempts, six actual mission jobs and all six ranges closed. A/C/D use their actual
fresh neural router, whose admitted proposal is recomputed from frozen model and
prior state; B uses round robin. This demonstrates inference use, not learning. Prior attempts include
one failure and intermediate successful runs; they are not independent performance
trials or evidence of learned improvement.
Content-addressed objects are fully written and fsynced before non-replacing
publication. Pointer changes use a cooperating writer lock, expected sequence,
durable intent, atomic same-directory rename and terminal record. A stale lock is
never stolen. Unresolved transitions block mission activation until explicit
reconciliation. Tested interruption cases are labelled fixtures; full power-loss,
SIGKILL and adversarial same-user filesystem qualification remain unproved.
startMission captures physical source-directory module handles, owned model
objects and configuration once. Its read-only identity exposes release/payload,
source/model/binding digests, activation sequence and configuration. Updating the
pointer affects only new missions. Imported accepted releases retain their exact
identity and execute an actual owned workload. The second source marker and
different router width are deliberate source/model restoration fixtures, not
architecture improvement experiments.
The kernel fsyncs typed admission before clock, budget or service effects, then
paired outcomes and denials. A failed post-effect write leaves an unknown outcome
and blocks further policy effects while allowing owned cleanup. The coordinator's
separate journal binds those actions to frozen release/model/source identity.
Consumers use admitted handoff payloads; actual stale, duplicate, conflicting,
unsupported and changed-payload/bundle challenges are refused without service
effects. Evidence-read failure cannot prevent cleanup; uncertain or incomplete
cleanup/persistence fails the normal gate.
Rollback restores the previous complete candidate execution bundle for new
missions. The protected release controller and admission policy remain separate.receipt.reconciliation lists completed and unfinished jobs, unknown admissions
and owned process disposition. It never claims that rollback erases completed
requests, probes or repairs. This local API has no new game UI integration,
production endpoint, credentials, arbitrary target or multi-user identity system.
The authority is explicitly one prespecified fixed-candidate epoch. It refuses
new content or controller authority inside an existing registry; cross-authority
rollback/import and an open-ended authority successor chain are unfinished. Any
inherited fixture-source regression is an exact, explicit authority exception.
Uncovered package/workflow source-only approvals are labelled separately from
runtime/numerical test evidence. Current successor checks include35 release unit
tests (eight authority, fourteen witness, thirteen lifecycle), thirteen core and
four composition tests; combined52-test runner output is retained inartifacts/ann05-successor-tests-v6.txt. Runtime-v2 retains17 scenarios, eight
original routing tests, full stdout and execution environment.
Mission receipts persist coordinator poison, pending and UNKNOWN counts plus
completion. RESOURCES_CLOSED records process cleanup scope; normal verified
completion additionally requires a clean coordinator, complete kernel audit,
successful supervisor exit and durable receipt. UNKNOWN never becomes a clean
close merely because worker processes stopped.