apps/ci commands — Testing and evidence
This page maps each requirement of SPEC.md to the tests that falsify it. The generic executor's evidence lives in the task DAG's testing page, and the build graph's in its own. Command tests run real ci invocations against fixture repositories and compare plain transcripts, exit codes and the files left behind.
| Requirement | Oracle |
|---|---|
| CIC1 | Option-validation tests: zero and negative --jobs, --dry-run --interlaced, SPARKLES_CI_JOBS precedence. |
| CIC2 | Every single-check command's transcript has one task block and the executor's summary. |
| CIC3 | The same ci test selection under --backend local and --backend nix gives the same verdicts (build graph oracle 6). |
| CIC4 | A parser test enumerates the table: every flag is rejected as an unknown option, before any command runs. |
| CIC5 | repository_inputs.cic5: over this repository, the files planning read, the toolchain's patterns, the planner's inputs and the working-directory names are workspace inputs, and a package outside the planner, documentation and a recipe tool are not (build graph oracle 20). |
| CIC6 | No test node has an incoming edge from another package's test; a stack-heavy test fails the -t 1 leg. |
| CIC7 | Fixtures that fail only to build under -cov, fail only their coverage test, and pass both, with their classifications and exits. A registry package is planned without -cov (graph_driver.instrumentOnlyUnder). |
| CIC8 | A run with tests and examples plans no library variant for the examples beyond those the tests plan. |
| CIC9 | The completion criteria, each checked by the milestone that delivers it. |
| CIC10 | The listing's JSON and the provider output, for a fixture with named, unnamed and no @slow tests. |
| CIC11 | A binary run under ci test and standalone, with the same options: the same per-test statuses and verdict; and two packages' worker nodes admitted at once. |
| CIC12 | Under --require-cached compile, a run with one edited module fails exactly the compiles that read it: the owning package's with a declared miss explanation, each dependent's with a manifest one, both naming the module, and a run with no edit passes. |
| CIC13 | A pipeline run plans one determinism-check task; a planted nondeterministic compile in the sample fails it as authoritative and removes the result (build graph oracle 19). |
| CIC14 | ci placements list on a fixture placement file prints every task in exactly one placement and shard, packed longest first by recorded task.wall with the default weight for unseen tasks; --placement NAME runs only its tasks and their build actions, and every other task ends Skipped(placement). |
| CIC15 | A scan of .github/workflows/ finds no ci invocation with --since. |
| CIC16 | Every command struct's run returns a RunExpected (a compile-time check over the command tree); a failing command's exit status and Error: line come from it, and ci perf record exits with its child's status. |
| CIC17 | ci check --help lists every check the hooks and workflows run; a bare group exits non-zero with its help. |
| CIC18 | Rendered frames of a scripted run: the tree nests each task under the one waiting on it and folds a waiting chain when rows run out; a failure gets its reason and last lines; a reused task counts apart and leaves the tree; the timeline appears only when wanted, wide enough and with rows to spare; finish prints the transcript's rest and erases the block; --output conflicts. |
| CIC19 | A scripted run's status lines: the heading, what ran with why, a failure with only the lines that explain it, the summary with reused and ran counts; at trace, the reused results and the unneeded fallback; every task row's columns aligned, clean and boxed; a log record as a line with its level as the verb. |
| CIC20 | The cache home resolves from --cache-dir, then XDG_CACHE_HOME, then ~/.cache; ci test --help lists the option with its variable. |
| CIC21 | A run across two worktrees runs each action in its own and orders them by an edge across; over a planted change, an action reading nothing it touches waits for its namesake and the rest do not; a real range's second commit reuses every action its first shares with it. |
| CIC22 | --memory-max parses to the scope's limits and refuses what is not one; an action's process reads the oom_score_adj its run set; on a systemd host a contained run's scope has the limits, the memory and pids controllers for its children, ci in supervisor and each action's cgroup beside it; --memory-max=none runs unconfined |
| CIC23 | Predictions come from the recorded peaks or each kind's default and the peaks file keeps the largest; the budget leaves ci at least 2 GiB and never takes more than half; the gate cancels under a floor, holds unbounded under a reserve, holds bounded over 10 % pressure while memory runs short, and under half the margin whatever the pressure, gives a 1 GiB tmpfs a 100 MiB reserve; the store is evicted by the deficit; a run reports the free space at its start and end |
| CIC24 | Over fixture packages, ci build -c -b of an application builds what dub build builds, run with the same output, and of a library an archive defining the same symbols, each at dub's target path; a second build runs nothing; an unknown configuration, a build command, another compiler and -b syntax are refused with exit status 2; no step starts dub (build graph oracle E7). |
| CIC25 | ci run passes its arguments, a -- among them, unchanged, and the program's exit status, for a package and for dub.sdl and dub.json single-file programs (oracle E7). |
| CIC26 | ci test -c and -b agree with dub test -c and -b on verdicts and exit status, over fixtures whose tests pass only as requested and over a representative set of the repository's requests (build graph oracle 2). |
| CIC27 | A full ci examples verify and ci examples standalone under strace -f -e trace=execve start no dub; an example that cannot be planned fails, naming why; two runs give every example compile the same result key (build graph oracle 5 step 5). |
| CIC28 | The line at a width that fits it whole, and at each narrower one: the task's name dropped first, then the free memory and the counts, then the words shortened, then cut; a line without budgets or a waiting task; the live view's frame with it beneath the tally once an admission state arrived, and the host's free memory and disk read through the view; without a live view, an Admitting line only past the period and only while a task waits. |
| CIC29 | Each of the summary's lines from a fixed summary; the planned line by kind; the JSON's fields; a fake run's events gathered into counts, a chain along its edge, the slowest and the waits by reason; a build-graph run, cold then warm against one store, whose summary counts each kind's executed and reused actions as RunStats does. |
| CIC30 | Over a fake checkout, each forwarding rule and each fallback gives ci's or dub's argument list, working directory and notice; through a fake ci and a fake pinned dub, forwarded and fallen-back command lines arrive unchanged, in the right directory, with the program's exit status and standard output and the notice alone on standard error; SPARKLES_DUB_PASSTHROUGH sends everything to dub; in the development shell the PLAN's E7 part 3 commands agree with dub's results. |
| CIC31 | A passing example run twice against one store runs once and is reused with the same output; a changed environment variable runs it again; a failing example and a run-always one run, by their own count, on every request; one past its time limit fails though it exits zero when stopped, and is never reused (oracle m9); the run is a keyed generator after its link, its key naming the binary through the link, the environment and the machine but not the example's position, and a report that reads its output back. |
Evidence ledger
| Requirement | Status | Evidence |
|---|---|---|
| CIC1–CIC10 | not started | — |
| CIC11 | partial | The leg's claim and threads: run_resources.Timings (ceil(p) tokens, at most half the capacity, and ceil(1.25 p) + 1 threads, at least 8 after a run of 10 s or more, at most as planned and the capacity, 8 threads unmeasured or with no CPU, a serial leg serial, records past a day refused), run_resources.bindTestLegs (a leg's $JOBS, in-process or a process, bound to its threads, its weight to its claim, the planned action untouched; another spelling of the threads keeps the planned claim; another handler left alone; every -t $JOBS bound, else the last -t whose value is a count; a caller's -t <count> beside $JOBS left as it is); the caller's own count charged to the thread budget, a claim at most as planned; the thread budget: executor.admission.threadBudget; --trace-admission's conflicts: cli.TestCommand.conflict; build_primitives.task.process.cpuOf. The rest of CIC11 is not ledgered |
| CIC12–CIC15 | planned | — |
| CIC16–CIC17 | planned | — |
| CIC18 | partial | task.reporter_live.frame.treeAndTally, task.reporter_live.frame.runningOnceCharged, task.reporter_live.frame.failuresAndReuse, task.reporter_live.frame.timelineIsOptional, task.reporter_live.finish.transcriptAboveAndBlockErased, task.reporter_live.Heights.share, task.reporter_live.liveViewWanted |
| CIC19 | partial | task.reporter_status.StatusTranscript.aRunAsStatusLines, task.reporter_status.StatusTranscript.boxed, task.reporter_status.rowTime.oneDecimal, task.reporter_status.testCounts.fromTheSummaryLine, console.writeRecord.levelAsTheVerb, console.hold.queuesUntilReleased, task.reporter_live.roundAxis.stepsTheRunHasNotPassed |
| CIC20 | delivered | cache_home.resolveCacheHome, args.envFallback.precedence, args.formatHelp.inheritedOptions |
| CIC21 | partial | build_graph.execute.runActionsAcross.eachPartInItsOwnWorktree, build_graph.execute.withSuffix.roundTrips, each_commit.reuseEdges.anUnchangedClosureWaitsAndAChangedOneRunsAtOnce, each_commit.inTreePaths.sourcesAndRootsNotOptionsOrPlaceholders, each_commit.unitsOf.aPackageOncePerListedHost, each_commit.refusedUnit.byNameAndHost |
| CIC22 | partial | run_scope.limitText, run_scope.memoryLimits (limits, none, unknown total memory, the floor, overflow), run_scope.scopeState (an empty value, a scope entered, one adopted); run_scope.scopeRequestBody (the properties systemd-run sends, the process in it); run_scope.requestScope.answers (the manager played by a socket, through a bus and as the peer: an error reply and a failed job with the process outside refused; no answer, running out of memory, an answer or an end from another sender, a job not seen to end, another job's or unit's end, and one done without the process lost); run_scope.requestScope.live (where systemd-run --user --scope makes a scope, a child moved into one in process, its memory.max the one asked for in whole pages, its controls delegated to the user); run_scope.unitDescription (printable ASCII, bounded); dbus.connection.peer, dbus.connection.waitFor, dbus.connection.waitForBounds; supervise.oomScoreAdjReachesTheChild (Event Horizon's write reaches the child, raised from a score below 1000: a test process at 1000 lowers its own to 999 first), build_graph.execute.oomScore.anActionRunsAt1000, test_leg.runTestLeg.workerOomScore and example_graph.runExample.oomScore (a build action's, a test worker's and an example's process read 1000, raised from a score below it: a process at 1000 lowers its own to 999 first); by hand on a systemd host: ci test --build-only --from versions reports contained by sparkles-ci-<pid>-<n>, MemoryMax <85 % of total, as writeBytes writes it>, each action accounted, ci reads 900 and its ldc2 actions 1000 in /proc/<pid>/oom_score_adj, and the scope has supervisor beside eh-run-*. Not tested automatically: adopting a scope (delegateRuns), the systemd-run fallback and its re-execution (enterScope), the caller-limit detection, and ci's own 900 |
| CIC23 | partial | run_resources.MemoryPeaks (recorded peaks, every kind's default, a zero record ignored, the largest kept, a kill's limit, round trip), run_resources.Timings and run_resources.predictTimes, through run_resources.bindTestLegs's test (a recorded wall time, any digest, else 200 ms a module, else the kind's typical time), run_resources.timingsOf (only actions that succeeded, the longer of two sharing an identity), run_resources.memoryBudget, run_resources.decideGate (pressure holds only while memory runs short; the headroom past the margin that bounds the budget below its cap), run_resources.cgroupAvailable (the charge less inactive cache and reclaimable slab, nothing known when a counter is missing), run_resources.holdMarginOf, run_resources.coldCharge, run_resources.hostShare (an unconfined run's cap, 85 % of the host), run_resources.evictionDeficit (the deficit, and every result when they are fewer), run_resources.pressureOf, run_resources.residentOf, run_resources.limitOf, run_resources.sizeText, run_resources.resultBytesOf, build_graph.execute.memoryIdentity (a leg's digest goes, its leg stays); the executor's executor.admission.memoryBudget, executor.admission.aloneBesideZeroClaims, executor.gate.boundedHold, executor.gate.diskCancels, executor.gate.floorWhileFull, executor.gate.cancelStillRunsCleanup; TDM20's process.run.memoryLimitFailure, process.run.inProcessMemoryLimit, process.run.memoryAdmissionAcrossRuns (two runs in a 1 GiB delegated scope, the second predicted from the first's peaks under a budget, within it, the large one alone, none killed); build_graph.execute.memoryPeaks.aKillRecordsItsLimit (a kill at the action's own limit records that limit) and run_resources.predict.theLimitAKillRecorded (the next run predicts it, an edit later, and limits at twice it); run_resources.RunWatch.gateEvictsUnderTheReserve (a gate under the store's reserve holds and evicts a real store, one above it evicts nothing); run_resources.representativeOf.aNarrowedLegPredictsNothing (a leg run with -- -i records no peak or wall time, so the next unfiltered run is not limited at the floor); by hand: a contained ci test --build-only --from versions records 8 peaks under memory/peaks and reports disk at the start: … 479.0GiB free of 490.0GiB and at the end. Not tested automatically: the kill a SIGKILL records (at least twice the prediction it ran under), the peaks file's lock between two runs, and a whole run under a tight scope (the M7 gate's measurement) |
| CIC24 | partial | commands.package_.packageRequestOf, commands.package_.graphCompiler, commands.package_.materializedPath, commands.package_.defaultBuildType, build_graph.variants.unmodelled; apps/ci/tools/graph-oracles.d --only=e7 steps 1–3 and 7 |
| CIC25 | partial | commands.package_.exitStatusOf, cli.afterDashes; oracle E7 steps 4–5 |
| CIC26 | partial | commands.package_.packageRequestOf, build_primitives.resolve.configure.resolve.testRootBase, graph_driver.lastRun.hosts; oracle 2's -c and -b scenarios; oracle E7 step 6; --only=2-configured-all |
| CIC27 | partial | runExamplesOnGraph in apps/ci/src/example_graph.d; oracle 5 step 5; the traced full runs recorded in the build graph PLAN's E7 progress |
| CIC28 | partial | task.admission_line.writeAdmissionLine.full, task.admission_line.writeAdmissionLine.narrows, task.admission_line.writeAdmissionLine.unbounded, task.admission_line.writeAdmissionLine.wideName, task.admission_line.writeAdmissionLine.cap, task.reporter_live.frame.admissionLine, task.reporter_status.StatusTranscript.admissionNowAndThen. Not tested automatically: a real terminal's frames. |
| CIC29 | partial | run_report.writePlanned, run_report.writePhases, run_report.writeActions, run_report.writeBusy, run_report.writeCritical (ties never crowd out a longer task), run_report.writeSlowest, run_report.writeWaits, run_report.writeDisk, run_report.writeMemory, run_report.summaryJson (an unread disk and an unmeasured peak are null), run_report.classOf, run_report.processAge, run_report.RunObserver.fromEvents, run_report.RunObserver.capFromTheExecutor, run_report.RunObserver.agreesWithRunStats (cold then warm against one store, reconciled with RunStats). By hand on pc2-local: a warm ci test --build-only with the summary against one without it (the build-graph PLAN, E6 item 8). Not tested automatically: a failed, cancelled or --require-cached run's counts. |
| CIC30 | partial | dub_forward.rules.packageCommands, dub_forward.rules.root, dub_forward.rules.single, dub_forward.rules.runnerArguments, dub_forward.rules.toDub, dub_forward.rules.decide, dub_forward.launch.sparklesCheckout, dub_forward.launch.isSubPackageOf, dub_forward.launch.declares, dub_forward.launch.isHandoffLoop, dub_forward.launch.fakes, dub_forward.launch.realDub; the development shell's gate commands recorded in the build graph PLAN's E7 progress. Not tested automatically: the shell's PATH order and the exec in place. |
| CIC31 | delivered | example_graph.ExamplePlan.contribute.keyedRunAndReport, example_graph.digestOfFields.unambiguous, example_graph.segmentOf.validSegments, ci.parseStandaloneExampleSpec.runAlways, ci.extractExamples.runAlways, ci.extractExamples.directivesStack, example_graph.exampleEnvironment.stableAcrossShellCommands, example_graph.machineFacts.stable; apps/ci/tools/graph-oracles.d --only=m9 |