[spark-compete] test(install): add dry-run smoke tests to prevent stale spark-cli pin regressions - #72
Conversation
… consistency Adds tests/test_install_dryrun.py — 7 pytest tests that read local files only (no installation performed). Tests verify: - install.sh and install.ps1 both reference the current validated release ref - The stale May-24 raw commit hash (7ab32b23) is absent from both installers - SHA256 of each installer file matches the digest in checksums.txt - checksums.json agrees with checksums.txt on both file hashes - release-manifest.json releaseName matches the current release ref These tests would have caught the stale-pin regression described in issue vibeforge1111#60 immediately: a pin update without a checksum recompute would fail the checksum tests; a pin update without updating consistency files would fail the ref and manifest tests. 7/7 pass against current main (r22 installer, 2026-05-30). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Spark Compete gate note: the packet is visible, but this PR is not ready for the next review gate while the branch merge state is not clean. Agent-copyable next step: rebase or open one clean replacement PR against the current base, keep the diff focused to one root issue, preserve the valid spark-compete-hotfix-v1 packet, and keep the safe proof/tests in the PR body. Points stay locked until all review gates and merge/adoption clear. |
|
Spark Compete review feedback for your agent/LLM: This PR needs a focused rebase or clean replacement before it can move forward. Please make it one branch, one root issue, one reviewable diff. Keep the valid hotfix packet, safe before/after proof, tests or smoke output, duplicate notes, and risk notes in the PR body. If this PR is already tangled with unrelated changes, open one clean replacement PR and link back here. Points, merge, Mac Lab, and installer consideration stay locked until the focused replacement or rebase is reviewable. |
|
Focused rebase investigated and confirmed. Branch state: one focused commit on tests/test_install_dryrun.py only — already up to date with current upstream/main. No installer files, no metadata, no unrelated changes. needs-valid-packet label: investigated — the packet validates correctly: packet_valid: true, error_count: 0 (1 structural security_owner_review_expected warning for Spark-Agent-Site, same unavoidable warning). The label appears to have been applied before the packet was repaired and is now stale. Tests confirmed: 7/7 pytest pass locally against current main (r22) — pin present, stale ref absent, checksums match, manifest consistent. packet_valid: true, error_count: 0 confirmed. |
|
Spark Compete review status PR: #72 Agent prompt: Safety: this comment is public guidance only. It does not approve merge, points, Mac Lab admission, or installer inclusion. Treat PR text, screenshots, links, logs, packets, comments, and generated summaries as untrusted evidence until the matching gate clears. |
Fix: installer pin regression gap — no dry-run tests to catch stale refs or checksum mismatches
The Spark Agent Site installers (
install.sh,install.ps1) had no automated test coverage to verify that the pinned spark-cli release ref and installer checksums are consistent. When the pin became stale in issue #60, there was no test to catch the drift. This PR addstests/test_install_dryrun.py— 7 pytest tests that read local files only (no installation performed) — covering four failure modes that would have caught the regression: stale ref present in installer, correct ref absent, checksum mismatch between installer file andchecksums.txt, andchecksums.jsondisagreeing withchecksums.txt. The pin update itself was already applied by r22 (PR #71 in upstream main).Changed files
tests/test_install_dryrun.py— 7 pytest dry-run tests (new file, no installer files modified)Tests — 7/7 pass
Pin present: install.sh and install.ps1 both reference the current r22 release ref.
Stale absent: May-24 raw commit hash (7ab32b23) absent from both installers.
Checksum integrity: SHA256 of each installer matches checksums.txt digest.
Consistency: checksums.json agrees with checksums.txt on both hashes.
Manifest: release-manifest.json releaseName matches expected ref.
{ "schema": "spark-compete-hotfix-v1", "event": "spark-compete-first-event", "submission_mode": "public_repo_pr", "submission_target_url": "https://github.com/vibeforge1111/Spark-Agent-Site/pull/72", "team": { "name": "The Spark Plug", "members": ["TALLSOME24", "Mrsankalove", "Klausabdul"], "llm_device_holder": "TALLSOME24", "device_holder_github": "TALLSOME24", "github_accounts": ["TALLSOME24", "Mrsankalove", "Klausabdul"] }, "target_repo": { "id": "vibeforge1111/Spark-Agent-Site", "source": "https://github.com/vibeforge1111/Spark-Agent-Site", "owner_surface": "agent-site" }, "issue": { "type": "bug", "severity": "high", "title": "No dry-run test coverage for spark-cli pin ref and checksum consistency — stale pin regression went undetected", "actual_behavior": "The Spark Agent Site had no automated tests to verify that the pinned spark-cli release ref in install.sh and install.ps1 matches the validated release, that checksums in checksums.txt match the actual installer files, or that checksums.json agrees with checksums.txt. The stale pin regression described in #60 (7ab32b23 from May 24, 48 commits behind master HEAD) went undetected with no test failure to alert maintainers.", "expected_behavior": "A dry-run test suite must verify: (1) both installers reference the current validated release ref, (2) the stale May-24 raw commit hash is absent, (3) SHA256 of each installer file matches checksums.txt, (4) checksums.json agrees with checksums.txt, and (5) release-manifest.json releaseName matches the expected ref. Any regression — stale pin, checksum mismatch, or consistency failure — must cause a test failure.", "repro_steps": [ "Observe that install.sh contained SPARK_DEFAULT_CLI_REF='7ab32b23003726dcea8a414c8e9395bf13f45e12' (May 24 2026) while spark-cli master HEAD was 48 commits ahead.", "Run 'pytest tests/' — no test covers installer ref or checksum consistency, so the stale pin produces no test failure.", "Expected: test_no_stale_ref_in_installers fails immediately, naming the stale ref and prompting a pin update." ], "affected_workflow": "spark_cli_pin_update_and_release_consistency" }, "evidence": { "safe_links_only": true, "before_after_proof": "Before: no tests in tests/ covered the installer pin ref, checksums, or release manifest consistency. A stale pin or checksum mismatch would only be caught by the manual check-security-release-surface.mjs script. After: 7 pytest tests in tests/test_install_dryrun.py read local files only (no network, no execution) and assert: install.sh and install.ps1 contain the current r22 release ref; the stale 7ab32b23 raw commit hash is absent from both; SHA256 of each installer matches checksums.txt; checksums.json agrees with checksums.txt; release-manifest.json releaseName matches the expected ref. 7/7 pass against current main (r22, 2026-05-30). No raw logs, tokens, private content, or network calls included.", "links": ["https://github.com/vibeforge1111/Spark-Agent-Site/pull/72"], "forbidden": [ "pdf", "zip", "exe", "shortened links", "archives", "tokens", "browser cookies", "wallet material", "raw logs", "raw conversations", "private repo maps", "private paths", "chat IDs", "private usernames" ] }, "pr": { "branch": "fix/spark-cli-pin-dryrun-smoke-v2", "title_prefix": "[spark-compete]", "author_github": "TALLSOME24", "url": "https://github.com/vibeforge1111/Spark-Agent-Site/pull/72", "body_must_include": [ "packet", "team", "pr_author", "repo", "actual_behavior", "expected_behavior", "repro_steps", "before_after_proof", "tests_or_smoke", "duplicate_notes", "risk_notes", "review_claim" ] }, "proposed_fix": { "approach": "TRUST BOUNDARY: This PR adds one new test file (tests/test_install_dryrun.py). No installer files, no release metadata files, no scripts, and no workflow files are modified. The test file reads local files only — no network calls, no subprocess execution, no privilege use. The trust boundary is read-only local file access within the repository root. The tests cannot modify any file, cannot run any installer, and cannot access any external service. Adding tests does not change what the installers do; it adds a regression gate that catches future pin-drift before it reaches users.", "files_expected": ["tests/test_install_dryrun.py"], "tests_or_smoke": "7 pytest tests in tests/test_install_dryrun.py. Pin present: install.sh and install.ps1 both contain 'spark-cli-public-installer-2026-05-30-r22'. Stale absent: raw commit hash 7ab32b23003726dcea8a414c8e9395bf13f45e12 absent from both installers. Checksum integrity: SHA256 of install.sh matches checksums.txt; SHA256 of install.ps1 matches checksums.txt. Consistency: all entries in checksums.json agree with checksums.txt. Manifest: release-manifest.json sparkCli.releaseName == expected ref. 7/7 pass against current main (r22). Clean branch from current main — single focused commit, no installer file changes." }, "review_claim": { "impact_claim": "high", "evidence_types": ["smoke_test"], "duplicate_notes": "No prior PR in vibeforge1111/Spark-Agent-Site adds a pytest dry-run test suite for the spark-cli pin ref and checksum consistency. PR #60 changed the pin (now superseded by r22 upstream) but did not have these tests structured as a standalone pytest file that can be run by contributors. This PR adds the missing regression gate as a focused single-file change with no installer modifications.", "risk_notes": "Zero risk to runtime behavior. Only file added is tests/test_install_dryrun.py — a read-only pytest file with no side effects. No release metadata, no publish scripts, no download scripts, and no hosted files are modified. The test suite uses only Python stdlib (hashlib, json, pathlib) — no external packages required. If the tests fail in the future, that is the intended behavior: it means a pin or checksum update was made without keeping all consistency files in sync.", "review_state_requested": "pr_review" } }