Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .llm/2026-11-02-scaffold-documented-lifecycle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Documented scaffold lifecycle — issue 2591

PR: https://github.com/rickylabs/netscript/pull/2592. The implementation observes durable seed
publication in the existing worker lifecycle and adds explicit service consumers to plugin install.
A pristine documentation-driven runtime gate tests both negative controls and restoration.

Run context and source validation: `.llm/runs/orch-divybot-6572256863--2591/context-pack.md`.
The PR carries the current immutable-head runtime evidence and READY decision. Refs #2591;
Cockpit owns review and merge during the canary hold. No lock or dependency version changes.
41 changes: 41 additions & 0 deletions .llm/runs/orch-divybot-6572256863--2591/context-pack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Resume — issue 2591

PR: https://github.com/rickylabs/netscript/pull/2592 (draft; Refs #2591).
Branch `orch/divybot-6572256863`; baseline `6766130bbafbe78a9bb5870f704987cb0743c5e6`.
S1 commit `321eca9b9c53d7ac7b12e832d09b9c43c861bde7`; repaired source candidate
`41fb51d1bcf48094b57265c87020654725ed2784`. This final sign-off commit changes run evidence only.

S1 and S2 independently PASS, same separate cross-family Opus session throughout. See
s1-review.md and s2-review.md. Event-driven post-seed observation uses existing durable
idempotency; plugin install --service persists managed service links and preserves manual links.
The documented block includes explicit stream service selection and detached Aspire startup.

behavior.documented-scaffold runs after static init and before all link/restart repair fixtures.
It reads the actual docs and runs skip-seed-handoff, drop-link and restored in pristine Postgres
workspaces. It requires real seed-correlated completion, actual stream/HTML Activity, stable
resident worker PID and exact AppHost/container cleanup. Read-side retries are test observation
only. The first live candidate exposed a public DTO mismatch; see memory-runtime-contract.md.

Deno 2.9.7: 191 focused test/step results PASS, all 21 owned-source check/lint/fmt files covered,
root check 4206 files PASS, broader quality PASS, CLI/workers JSR audits PASS with existing
warnings. Four carrier generators and all 15 root check tasks PASS with no generated drift.
See validation.json for source hashes and actual local summaries. RTK and local Docker unavailable.
No full local runtime claimed. Owned local reproduction AppHost stopped; foreign resources left alone.

Next: run canonical one-pass scaffold.runtime CI at this sign-off head; require both controls RED
for their precise symptoms and restored PASS, plus canonical cleanup. Complete all remote checks
and same-session independent evidence review, then put final exact-head evidence on PR 2592.
Keep head fixed once accepted. Write READY with the full SHA by atomic ignored final-report file
handoff only; file creation queues publication, not confirmation of posting. Never commit the
assignment or final report. Preserve draft/no-merge canary hold; Cockpit reviews and merges.
No rebase or force push. Public artifacts use repo-relative paths. No accepted product debt.

Latest steering: 650fb2e runtime CI passed the seed control/Activity/exact cleanup, then failed
recursive scratch deletion with PermissionDenied. The S3 repair retains generated workspaces and
reduces repeated success logs to preserve all variant receipts. See memory-runtime-workspace-retention.md.
Final acceptance is still pending; the latest PR head and exact CI run supersede earlier candidates.

S3 source review now PASS (s3-review.md). Independent rerun: 31 focused tests plus changed-file
check/lint/fmt; broader quality also passes. The sign-off commit retains generated scratch after
exact runtime cleanup, with all acceptance assertions unchanged. Run the final one-pass CI at
this next pushed head and use its full SHA, never an earlier failed candidate, for READY.
11 changes: 11 additions & 0 deletions .llm/runs/orch-divybot-6572256863--2591/drift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Drift

- RTK absent; direct read commands and structured validation wrappers used.
- Local Docker runtime unavailable. Full local reproduction is unproven, not a product pass.
- Specific operator instructions override generic assignment boilerplate: Refs #2591, draft
review surface, no merge during the canary hold. Final report uses the file publication handoff.
- No product debt accepted.

- S2 adds tracked Aspire-referencing gate files, so its generated surface inventory must refresh.
The allowed derived surface includes `.llm/tools/validation/fixtures/aspire-surface-manifest.tsv`,
regenerated exclusively through `aspire-surface-manifest.ts`; no version pin changes.
18 changes: 18 additions & 0 deletions .llm/runs/orch-divybot-6572256863--2591/lesson-2026-11-02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Documented scaffold acceptance

Runtime fixtures that repair links or restart children can mask failures in the documented order.
Test the documented sequence in an independent pristine workspace before fixture-only interventions.
Use real post-seed execution with its correlation identity, and assert the actual stream-backed
Activity projection after a committed mutation. A generic healthy resource or a manually triggered
sample cannot prove either wiring contract. Keep both deliberate fault controls alongside the gate.

Public execution DTOs may deliberately omit correlation keys. Bind provenance through the public
filtered route and parse regression fixtures through the real response schema. Preserve nested
errors from live controls so a gate failure identifies the application boundary. Canonical exact
AppHost cleanup is stronger than hoping a detached host appears in an enumerated process list.
Distinguish source review PASS from actual final-head runtime acceptance.

A Postgres bind mount can leave container-owned scratch that a non-root runner cannot recursively
delete. Prove runtime disposal separately and retain the generated workspace for diagnosis; do not
turn successful acceptance into a privileged filesystem cleanup requirement. Bounded command logs
should retain compact per-scenario receipts instead of repeating every successful CLI invocation.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Environment — 2026-11-02

Deno is 2.9.7. RTK and a global memory service are unavailable; use structured wrappers directly.
Local Docker has no daemon/socket, no dockerd, systemd, or sudo. A foreign AppHost exists and must be left alone.
Read prior scaffold lessons in `.llm/runs/orch-divybot-6569760641--2587/memory-*.md` before retrying prior paths.
CLI spelling for the brief's shorthand installs: `plugin install worker --name workers --samples` and
`plugin install stream --name streams --samples`. Positional plural without --name fails validation.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Bind final acceptance to the public runtime

Same-session cross-family S2 repair review passed at source candidate `41fb51d`.
The reviewer traced the public by-correlation route and result payload persistence, and independently
ran the focused runtime/builder/runner tests plus changed-source checks. Live acceptance remains a
separate obligation; a source PASS does not certify the final CI runtime.

The canonical cleanup helper stops the exact generated AppHost and asserts no owned container
survivors. Its process classification array is empty by design; do not describe that receipt as a
complete process inventory. Foreign and unproven resources are left untouched.

Record the final-head domain report and all three documented variants in the PR evidence. Keep the
source head fixed once that run passes; final publication goes through the ignored atomic report
file, and its creation means queued publication only.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Service consumers and generated output

`plugin install --service <name>` writes `linking.consumers.services` in the installed manifest;
`reconcilePluginReferences` then writes the service's PluginReferences and helper regeneration
wires discovery. `--service-refs` is the opposite direction: services the plugin depends on.
Do not confuse the two. Reinstall without --service preserves the recorded selection.

The root formatter excludes CLI sources. For owned CLI files, copy only root fmt/lint settings
to an ignored config without selection exclusions, then pass explicit owned files to the wrappers.
Existing unrelated install test files have legacy format drift; do not include them in this slice.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Why runtime CI masked the reported path

`packages/cli/e2e/suites/scaffold/capability-suites.ts` restarts background resources after DB seed.
`prepare-streams-storage-fixture.ts` explicitly adds users->streams, while pristine install links only apps.
`plugins/workers/bin/runtime.ts` reads the durable seed request just once at combined-process startup.
A running worker misses a later seed. A new gate must assert documented setup before either repair fixture.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Runtime acceptance must respect the public DTO

Workers execution responses deliberately omit correlationId. Use the public
`/api/v1/workers/executions/by-correlation/{correlationId}` endpoint to establish seed provenance,
then assert completion, actual result, progress and time. Parse the canonical public response
schema in a regression fixture; a hand-built DTO containing hidden fields can mask a broken test.

The first CI run 41418574351 at f82ef33 exercised two documented variants in 189693ms. The seed
negative control was RED while real stream-backed Activity passed. The next variant completed a
real job, exposing the test's incorrect DTO assumption. That run is a failed attempt, not acceptance.

The general teardown reporter did not enumerate detached AppHosts on that runner. Reuse the existing
runtime/evidence/cleanup.ts fixture helper with the exact generated AppHost and project root.
Place the documented gate after static init so the main cleanup tail has a valid AppHost file,
while keeping it before all plugin-link and runtime-restart fixtures. Preserve nested errors.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Runtime cleanup and disposable workspace retention

Run 41423746948 at 650fb2ed00389105ebe6cb242a212c827f4c1309 passed the seed-handoff negative
control, actual stream/Activity mutation and canonical exact-AppHost/container cleanup. It then
failed at recursive workspace removal with filesystem PermissionDenied. Database bind mounts can
leave data owned by a container user; runtime cleanup must not require deleting that scratch data.
Keep the generated workspace under the owned smoke root for diagnostics after stopping its AppHost
and proving no owned container survivors. Do not add sudo, broad chmod or container-user workarounds.

The earlier 41423003834 attempt failed rendering Fresh after its esbuild subprocess stopped. It is
a retained failed diagnosis, not acceptance; the later run rendered the page and reached cleanup.
Reduce successful per-command log repetition so the command evidence tail retains all three variant
IDs, negative symptoms, unchanged worker PID and cleanup outcomes in the final full-suite report.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Scratch tests and runtime proof

Deno's repository test configuration excludes `.llm/tmp`, even when a test path is explicit.
A copied config in that scratch directory cannot list the real workspace members: Deno requires
members to be nested beneath the config's workspace root. Those failed launches prove nothing.
Prefer the ordinary source regression modules and the registered runtime gate's deliberate controls.
The full Docker-backed path is required in CI; do not infer it from local wrapper success.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Watcher review lessons

Arm the directory watch before checking current seed intent; normalize the parent with realPath.
Deno 2.9.7 closes a pending watch iterator cleanly and permits disposal after close. Its test
sanitizers do not prove watcher cleanup. Test observed events and bounded termination explicitly.
Startup may reject malformed existing intent, but later sample dispatch failures must preserve
pending intent and leave the healthy worker running. Separate readiness from observer lifetime.
Bound observer drain at shutdown and preserve the worker's original error. Re-arm when the watched
parent is removed. Service reselection must revoke only prior CLI-managed edges, preserving manual
appsettings links; retain the previous consumer set in planning before writing new metadata.
30 changes: 30 additions & 0 deletions .llm/runs/orch-divybot-6572256863--2591/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Plan & Design — READY FOR REVIEW

Repair wiring through existing lifecycle and manifest consumer metadata.

1. Watch the seed handoff's parent directory using Deno.watchFs before checking existing intent.
Dispatch existing and future publications through the same idempotent worker handoff. Tie
watcher lifetime and failures to the combined worker process; no polling or request handlers.
2. Add an explicit `plugin install --service <name>` consumer selection alongside `--app`.
Validate before writes, persist through the existing linking manifest and reconciler, and
preserve it on reinstall. Document streams installation with that selection.
3. Add a clean documented-order runtime gate that runs before existing restart/link fixtures,
verifies post-seed completion and stream-backed Activity, and exercises both negative controls.
4. Regenerate all affected carriers using their tasks, run scoped and broader gates, separate
cross-family IMPL-EVAL, final-head runtime CI, then READY handoff. Do not merge.

PLAN-EVAL: N/A. Owner explicitly scopes this as wiring with no design changes. The solution
reuses filesystem notification, existing seed dispatch/idempotency, and existing manifest edges.
No public contract redesign, storage migration or release is planned.

Gates: Deno 2.9.7 structured scoped check/lint/fmt/tests; quality:gate; JSR audits for affected
packages; full carrier chain and every root check task; clean runtime gate and negative controls;
one-pass scaffold.runtime in CI at the final head. Tests must verify real execution and Activity.

Risks: missing watcher events (subscribe before read; atomic publication and lifecycle tests),
duplicate dispatch (existing stable seed identity and durable acceptance), unwanted linking
(explicit service selection, validation and reinstall preservation), runtime fixture masking
(independent pristine setup), unavailable local Docker (record unproven; CI runtime required).

Deferred: visual redesign, unrelated plugins, protocol/storage changes. No accepted product debt.
Open decisions: none that require owner input. Exact focused test list follows the implementation.
19 changes: 19 additions & 0 deletions .llm/runs/orch-divybot-6572256863--2591/research.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Research

Read issue 2591 and all comments, issue 2587 and comments, and merged PR 2589's body.
No triage comment or existing PR for 2591 was found. Consulted prior run memory first.
Called the in-repo MCP `find_guidance` for scaffolding, lifecycle, linking and doctor.

At baseline, combined workers dispatch seed intent only once at startup. The documented
start/init/generate/seed order publishes intent after that read. The runtime suite restarts
workers after seed, hiding this ordering failure. Its streams storage fixture also adds the
users service's stream reference; normal install links only apps. Both mask acceptance gaps.

Reproduced clean local init, worker install, stream install and isolated Aspire start under
Deno 2.9.7 in `.llm/tmp/2591-repro/documented-2591`. Settings confirm app->streams but no
orders->streams edge. Plugin doctor verifies the generated registry but reports worker runtime
unhealthy. All three DB commands fail because this environment has no Docker daemon. Full
baseline runtime reproduction is unproven locally and must run on the CI runtime runner.

CLI is Archetype 6; workers is Archetype 5 with runtime behavior. No new package entrypoint
or third-party dependency is needed. Existing seed identity and worker idempotency remain.
Loading
Loading