Task — engineering-spec@1

End-to-end regression for the cs/memory/cuo rename

doneTASK-IMP-134
module improvement · class product · priority p1 · created 2026-07-22 · shipped null
depends on TASK-IMP-130, TASK-IMP-131, TASK-IMP-132 · blocks none

TASK-IMP-134: End-to-end regression for the cs/memory/cuo rename

Summary

Prove the combined result of TASK-IMP-130/131/132 — the renamed cs bin with memory and cuo both added to the same dispatch table — works as an integrated whole via an offline, in-repo test, and separately checklist the genuinely network/Homebrew-dependent "clean machine" portion the plan describes, which cannot run in this repo's CI.

Problem

TASK-IMP-130, 131, and 132 each have their own acceptance criteria proving their own change in isolation. None of them proves the three changes compose correctly once all land — in particular, TASK-IMP-131 and TASK-IMP-132 both edit the same cli.mjs dispatch table object and were flagged in their own specs as having a sibling merge-conflict risk (each depends only on TASK-IMP-130, not on each other, so nothing stops them being authored/implemented in parallel). An e2e test that builds the payload fresh after all four tasks land and exercises cs install, cs memory, and cs cuo together in one process is the only check that would catch a dispatch-table integration break that per-task unit tests would miss.

Separately, the plan's own item 7 describes a "clean machine" regression involving a real Homebrew install and a real npm release — this repo's only existing e2e precedent, test_e2e_skeleton.sh, is explicit that it runs "with NO model, NO network, NO credentials." The plan's literal ask does not fit that convention, and TASK-IMP-133's own audit (ISS-005) already found that no task in this batch actually covers cutting the release this regression would need. Presenting a network-dependent AC as if this repo's CI could run it would be the same class of fabricated-citation defect TASK-IMP-133's audit found and fixed.

Proposed Solution

Two halves, not one:

  1. Offline integration test (this task's own automatable deliverable). A new test, tools/install/tests/test_cs_rename_e2e.sh, following test_e2e_skeleton.sh's established shape (build from source into a scratch dir, no network) that builds a scratch payload after TASK-IMP-130/131/132's changes are present, then in one continuous run: confirms the generated package.json's bin is cs (not cyberos); confirms cs -h's usage text lists memory and cuo alongside install/uninstall/version/status/create/gates/mcp/help; confirms cs memory <cmd> and cs cuo <name> both dispatch correctly using the same stub techniques TASK-IMP-131/132's own tests established, run back-to-back against the SAME built payload (proving the combined SCRIPTS-table object is well-formed, not just each entry individually reachable).
  2. Manual release-time checklist (not an automated AC). A short checklist, recorded in this task's own body rather than as a testable AC, for whoever performs the actual release: install the released cs via the updated Homebrew formula (TASK-IMP-133) on a real machine, confirm cyberos (bare) resolves only to a locally pip-installed cyberos-memory if present (no competing public-CLI claim on that name), and confirm cs memory <cmd> reaches the same store. This half is explicitly NOT gated by this task's own ready_to_implementdone transition, since it cannot happen until a real release exists (the same operational gap TASK-IMP-133's audit named).

Alternatives Considered

Success Metrics

Scope

In scope: tools/install/tests/test_cs_rename_e2e.sh (new), and the manual release-time checklist recorded in this spec's body.

Out of scope / Non-Goals

Dependencies

Depends on TASK-IMP-130, 131, and 132 — the automated offline portion (clauses 1.1-1.5) only needs their CODE to exist, not TASK-IMP-133's completion. TASK-IMP-133 is deliberately NOT in depends_on: its own audit (ISS-005) established that it cannot reach done until an npm release is actually cut and published, an externally-gated, indefinite-duration event. Making this task's depends_on include TASK-IMP-133 would block this task's own immediately-implementable, fully-automated portion behind that external gate for no reason — only the MANUAL checklist in Edge Cases (clause 1.6, not gated by this task's status transitions) actually needs TASK-IMP-133 to have shipped. Nothing in this batch depends on this task (blocks: []).

Relationship to TASK-IMP-107. That task built test_e2e_skeleton.sh, the offline e2e precedent this task's own test file follows structurally (build-from-source into scratch, no network, no credentials) — including its file-level pattern of building ONE scratch payload before any check function runs, which this task's own clause 1.1 depends on directly (see §1.1's revised wording).

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

§1 — Verdict summary

Six §1 clauses, six ACs, three edge cases (one of which is the manual checklist itself, one a documented scope-narrowing note, one security-class). The most consequential finding was a depends_on error that would have blocked this task's fully-automatable portion behind an indefinite external gate for no real reason — a batch-level sequencing defect, not a wording issue.

§2 — Findings (all resolved)

ISS-001 — depends_on included TASK-IMP-133, blocking the automated portion behind an indefinite external gate

This task's clauses 1.1-1.5 need only TASK-IMP-130/131/132's CODE to exist. TASK-IMP-133's own audit (this same batch, ISS-005) established that task cannot reach done until a real npm release is cut and published — an operational event with no owning task and no fixed timeline. Making this task depend on TASK-IMP-133's completion would have blocked its own immediately-implementable, fully-automated test behind that indefinite wait, for a manual checklist section that isn't even gated by this task's own status transitions. Resolved: removed TASK-IMP-133 from depends_on; it remains a named soft-prerequisite for the manual checklist only.

ISS-002 — AC 1 deferred to "code review" for a mechanically checkable claim

Clause 1.1 (build exactly once, before any check) is directly checkable by grepping the test file's own source for the build-invocation count and its position relative to the first check function — the same technique AC 5 already used successfully on the same file. The first draft instead said "confirmed by reading the test file's own control flow at review time." Resolved: converted to the same grep-based technique as AC 5.

ISS-003 — AC 6 deferred to "manual review of this document" for an equally mechanical claim, with a confusing self-referential sub-clause

Clause 1.6 (the spec records a manual checklist) is checkable by grepping this very spec file for the required heading text. The original AC additionally required the checklist section "not be referenced by any traces_to in this AC list," a confusing, circular condition that added no real verification value. Resolved: converted to a plain grep-count check on the spec file itself; the confusing sub-clause was dropped rather than fixed, since it was not protecting against anything the simpler check misses.

ISS-004 — clause 1.1's single-shared-build requirement didn't cite the concrete precedent that makes it implementable

The clause stated the principle ("one build, not per-assertion") without pointing at test_sync_host_plugins.sh's own file-level build-once-then-many-checks pattern, the exact structure an implementer should copy. Resolved: the clause now cites that file directly.

ISS-005 — AC 3's ten-verb check was vulnerable to substring false positives

A naive grep for each of ten command names against cs -h's usage text could pass on an incidental substring match (a hypothetical future word containing "create" or similar) without the actual command name being listed. Resolved: tightened to word-boundary-safe matching (grep -wo or equivalent).

ISS-006 — the guardrail metric's completion trigger was subjective

"Before the cs rename is announced as complete to any external user" has no fixed, checkable moment - "announced" is a judgment call, not an event. Resolved: retied to a concrete artifact already established elsewhere in this batch — the release that includes TASK-IMP-130's own CHANGELOG entry (clause 1.6 of that task) being tagged and published.

ISS-007 — FM-101: title exceeded the 72-character limit (caught by the machine floor)

task-lint.mjs, run after the six findings above were resolved, flagged the title at 76 code points. Resolved: shortened to "End-to-end regression for the cs/memory/cuo rename" (title metadata only).

§3 — TRACE-006 semantic sufficiency (per clause)

ClauseVerb demandCited test assertsVerdict
1.1 MUST build once, shared by all checksa countable, positioned fact about the test file's own sourceAC 1 (revised): grep count + line-position checksufficient after revision (was manual-review - ISS-002)
1.2 MUST confirm bin.cs / no bin.cyberosboth halves on the built artifactAC 2: both asserted directlysufficient
1.3 MUST list all ten verbsprecise, non-substring-vulnerable matchAC 3 (revised): word-boundary-safesufficient after revision (was substring-vulnerable - ISS-005)
1.4 MUST confirm memory+cuo work together on shared buildboth dispatches succeed in one runAC 4: both asserted in sequencesufficient
1.5 MUST run offlineabsence of network-invoking commands in the test's own sourceAC 5: grep-basedsufficient
1.6 MUST record manual checklist in spec bodya countable fact about this spec file's own textAC 6 (revised): grep count on the spec file itselfsufficient after revision (was manual-review - ISS-003)

§4 — Resolution

Six findings, including one batch-sequencing defect (ISS-001, the most consequential), all resolved in the audited revision. Score = 10/10.

Status transition draft -> ready_to_implement is authorised by this verdict per STATUS-REFERENCE.md §1.1. The two /ship-tasks human-acceptance gates remain unchanged; the manual release-time checklist inside this spec is explicitly NOT part of that gate and is tracked as a separate release-process step.


End of TASK-IMP-134 audit.