fix(ci): eliminate CI/CD false positives, false negatives, warnings and errors - #159
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #158
…t hermetic - rust/tests/docker_network.rs no longer probes https://api.github.com; it pings a second local --internal network sidecar instead, so the shared runner IP hitting the 60 req/hour unauthenticated GitHub API limit can no longer fail the suite (same root cause as the JS test, issue #158) - docker logs are folded into the exit-code assertion message - new rust/tests/ci_workflow_invariants.rs (17 tests) and js/test/ci-workflow-invariants.js (12 tests) guard timeouts, per-job concurrency, writer serialisation, !cancelled(), pipeline-status coverage, git-init hints, pipefail and the coverage helper
Adds verbose logging (default OFF) around the docker create -> network connect -> start sequence in both the JS and Rust lifecycle helpers, so the next failure carries the command, exit status, stdout and stderr instead of only an exit code (issue #158). Covered by 5 JS and 5 Rust unit tests, including one asserting the default-off behaviour.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
…cy graph is off The dependency graph is disabled for this repository (the compare endpoint returns 403), so actions/dependency-review-action@v5 failed with "Dependency review is not supported on this repository" — a configuration gap reported as a red gate. The job now probes the endpoint and emits an actionable ::warning:: instead, rather than hiding the gate behind continue-on-error. Once the setting is enabled the gate becomes enforcing again with no workflow change.
|
All four workflows are green on Two things worth flagging for a maintainer:
|
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $12.743766📊 Context and tokens usage:Claude Opus 5: (3 sub-sessions)
Total: (8.1K new + 286.9K cache writes + 14.0M cache reads) input tokens, 112.4K output tokens, $12.741757 cost Claude Haiku 4.5:
Total: 1.5K input tokens, 105 output tokens, $0.002009 cost 🤖 Models used:
📎 Log file uploaded as Gist (4890KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
Fixes #158.
What was wrong
Run 31380353470 (JS CI/CD on
d959632) was red, and several gates that looked green could never have gone red.wget -q --spider https://api.github.com. GitHub allows 60 unauthenticated API requests/hour per IP and hosted runners share egress IPs, so the probe returned403 rate limit exceeded. Theping -c 1 formal-aihalf always passed — the product feature was never broken. The same probe existed inrust/tests/docker_network.rs:80.grep -oP '\d+\.\d+(?=%)'never matched, because Bun's totals row has no%(All files | 92.60 | 88.09 |).parseFloat('')→NaN→ "Could not determine coverage, skipping check" → exit 0.| tee coverage.txt || true.timeout-minuteskill ascancelled, and there was no aggregate status job.hint: Using 'master' as the name for the initial branchactions/checkoutwith noinit.defaultBranchconfigured.concurrencywithcancel-in-progressalso cancels a release that already started pushing; JS and Rust release jobs used unrelated groups.What changed
Tests made hermetic (both languages).
js/test/docker-network-integration.jsandrust/tests/docker_network.rsnow create a second local--internalnetwork with aformal-db-aliased sidecar and assertping -c 1 formal-ai && ping -c 1 formal-db. This still proves two-network attachment, with no external dependency.docker logsoutput is folded into the assertion messages.Coverage gate made real. New
scripts/check-js-coverage.mjsparses theAll filesrow by column and treats an unparsable report as a hard failure, not a skip. The test step runs withset -o pipefailand no|| true.Workflow hardening (all four workflows): workflow-level
concurrencyremoved in favour of per-job cancellablecheck-*groups; every job that writes tomainshares one non-cancellablemain-writer-${{ github.repository }}-maingroup across both workflow files;permissions: contents: readby default;timeout-minuteson every job;always()→!cancelled()outside the status job;GIT_CONFIG_*to silence the git-init hints; apipeline-statusaggregate gate that fails onfailureand oncancelledwhen onmain.New workflows from the templates:
security.yml(CodeQL forjavascript-typescript/actions/rust,dependency-review-action@v5, secretlint) andlinks.yml(lychee with a Wayback Machine fallback and.lycheeignore).Verbose mode, default OFF.
START_DEBUG=1now traces the wholedocker create→docker network connect→docker startsequence — command, exit status, stdout, stderr — in bothjs/src/lib/docker-network-lifecycle.jsandrust/src/lib/docker_network_lifecycle.rs, matching the existingSTART_DEBUGconvention.Tests
js/test/check-js-coverage.mjs(7)js/test/ci-workflow-invariants.js(12)!cancelled(),pipeline-statuscompleteness, git hints,|| true, script existencerust/tests/ci_workflow_invariants.rs(17)set -o pipefail, the parity gate, and the security/link workflowsjs/test/docker-network-lifecycle.js(5) +rust/src/lib/docker_network_lifecycle.rs(5)All pass locally, along with
bun run lint,bun run format:check,cargo fmt --check,cargo clippy -D warnings,check-file-size.mjsandcheck-test-parity.mjs(Rust 698 / JS 754 = 92.1 %).Upstream report
.jscpd.jsonin the JS pipeline template sets"format": "console", but in jscpdformatis the list of languages to analyze (output isreporters), so jscpd analyzes zero files and the duplication gate can never fail. Reported with a minimal reproduction, workaround and code fix: link-foundation/js-ai-driven-development-pipeline-template#126. The Rust template has no.jscpd.json, and its only workflow-levelconcurrencyblock cancels onpull_requestonly, so no report was warranted there.Analysis
Evidence, timeline, per-requirement root causes and the library survey are in
dev/log/issues/158/pulls/159/ANALYSIS.md, alongside the downloaded run logs.