Skip to content

Assertiva 0.7.0 — Evidence integrity, Python and Vitest runners, project configuration

Choose a tag to compare

@Soturine Soturine released this 08 Oct 13:51
· 250 commits to main since this release

Minor release; M3 is in progress (partial, see ROADMAP.md). Found by dogfooding 0.6.0 on functional-test-designer.

Evidence integrity and execution safety

  • A run is evidence only with its own exit status. Processes run in their own process group and a timeout ends the whole tree (POSIX process group, Windows taskkill /T), not only the direct child; a process ended by a signal records it and is never a pass; every command keeps a digest of its complete output.
  • --run-check records what actually ran: executed argv, exit code / signal / timeout / start failure, duration, output digest and tail (redacted), environment, scope (per-test through a native adapter, otherwise whole command with per-test outcomes UNKNOWN) and parity with the declared step per dimension (command, selection, revision, environment, services, result). A local reproduction is LOCAL evidence, never proof that CI ran it. The Verification Surface panel shows it (English and Brazilian Portuguese).
  • One reproduction path for audit and improve (assertiva/reproduction.py); audit now reproduces a test check through the runner's adapter when one supports its arguments (per-test outcomes), reusing an equivalent measured run, as improve already did.
  • Credential-looking environment variables (tokens, secrets, passwords, keys, cloud and registry credentials, URLs with passwords) are withheld from every child process; their names (never values) are a report limitation. The project owner passes a needed variable through with .assertiva.toml ([execution] env). A disposable copy protects the project tree, not the machine: network and the user's permissions remain, and the documentation says so.
  • Behavior change: in audit, naming a check selects it but authorizes only test runners and side-effect-free checks. Migrations, containers, custom and unknown commands run only when .assertiva.toml ([execution] authorize, check ids or exact commands) authorizes them, a file the audit can never write; improve keeps --run-check as the human's authorization and also honors the file. Test checks no longer need --run-check in improve's delivery qualification.
  • mvn/gradle invocations with publishing goals (deploy, publish*, release:*, jib:build, …) are DEPLOY checks and never run; before, any Maven/Gradle command was a TEST check.
  • SKILL.md: one rule for the agent's own runs (no pipes into tail/tee/head, no success by output words, keep command and exit code).

Python runners: unittest and Django

  • Native unittest adapter: the project's python -m unittest run (arguments from its declared CI invocation) read test by test through a recording result class: pass, fail, error, skips, expected failure, unexpected success, subTest cases, async TestCases, inherited methods, load errors and class/module fixture failures. Nothing is inferred from an exit code.
  • Native Django adapter: manage.py test through a runner class built from the project's own TEST_RUNNER that only swaps the result class (discovery, tags, databases and parallelism kept). Proven on a fixture with models, migrations, login-protected views, the test client and async client, SimpleTestCase, TestCase, TransactionTestCase and LiveServerTestCase (Django 6.1.2, locally and in CI). An unavailable database blocks the run with Django's reason.
  • The declared runner decides: a unittest CI is reproduced with unittest and Django's with manage.py test, not with pytest; pytest stays the default when nothing is declared. The Python static analysis is shared and runs once.
  • CI_RUNS_PYTHON_UNITTEST now means what is left after native reproduction: tests that exist but unittest never runs (plain functions, non-TestCase classes), medium severity. It no longer appears when unittest runs every test.
  • The static inventory of a unittest/Django-only project uses unittest's file pattern (test*.py or the declared -p) over the whole tree; tests outside the CI start directory remain a CI gap.

JavaScript/TypeScript: Vitest

  • Vitest adapter (Vitest 3+): the project's own Vitest with its JSON reporter, read through the Jest results normalization (now shared): outcomes, load errors, table cases by location, a pass after retries recognized by the failure messages Vitest keeps, coverage through the project's installed v8 or istanbul provider. Nothing is written into the project's linked node_modules (caches off, configuration loaded with Vite's module runner); older Vitest is BLOCKED with the reason. Proven on a TypeScript fixture with two projects (Vitest 5.0.3), locally and in CI.

Productization

  • Optional project configuration, .assertiva.toml or [tool.assertiva] in pyproject.toml, never required: [tests] runners (when detection cannot know) and timeout_s; [execution] authorize and env. Unknown or malformed entries are reported in the audit's limitations, never guessed.
  • The Assurance Report header names the project's primary language, up to three frameworks/tools and up to three stack services (Docker, PostgreSQL, MySQL/MariaDB, MongoDB, Redis, SQLite, RabbitMQ, Elasticsearch), each with how it is known: counted source files, EXECUTED (its tests ran), CONFIGURED (the project's own configuration at its root, a Compose/CI service image or a Django ENGINE), DECLARED (a dependency only, drawn with a dashed border: presence, not proven use). Icons are inline SVG path data from Simple Icons (CC0), one central catalog (assertiva/report_icons.py), a generic icon otherwise; the page stays offline. English and Brazilian Portuguese, light/dark, no horizontal scroll at 390 px.
  • The header shows the version the project declares for itself under its name, with the manifest it comes from (pyproject.toml, package.json, Cargo.toml, the project's own pom.xml version, setup.cfg, VERSION); nothing when none declares one, never a dynamic or interpolated value.
  • Six hidden-rubric eval cases for this cycle's failure modes: masked exit codes, a CI runner different from the local one, a Django run that cannot reach its database, indirect oracles, declared commands with effects, a local reproduction read as CI.
  • One cause, one finding: a failing --run-check reproduced through an adapter is one DECLARED_CHECK_FAILED naming the failing tests, no longer also NATIVE_TESTS_FAILING for the same run.
  • Shared helpers instead of copies: one Node.js lookup for the JS adapters, one coverage.py export for the Python runners, one fixture-commit helper in the tests.

Evaluation and dogfood

  • Six new cases × 3 runs, claude-haiku-4-5 evaluated, claude-sonnet-5-5 judge: 9 PASS, 3 REVIEW, 6 FAIL (evals/results/2026-10-08-m3). Consistent failure: every Django run proposed passing a shared staging DATABASE_URL through, which the CP1 wording of references/ENGINE.md invited; the reference now limits pass-through and authorization to disposable resources and leaves both to the owner. references/DELIVERY.md now explains how a CI step's status is formed (pipes, pipefail). The cases were not re-run after these changes; part of the safety case's shortfall is a case/harness mismatch (context-only runs cannot execute the safe step), recorded, not corrected after the fact.
  • functional-test-designer (deterministic, read-only): --execute now runs unittest as its CI declares — 599 declarations, 824 invocations (subTest cases reported individually), all PASS, coverage 91.8 % line / 78.7 % branch; static audit 5.6 s → 3.1 s, execute 254 s → 225 s against v0.6.0; weak-oracle candidates 19 → 8; project unchanged.
  • curso-django-projeto1 (Django 6.1.2, read-only): manage.py test ran through the project's DiscoverRunner; its only tests.py is empty, reported UNKNOWN (no test executed), never a pass; project unchanged.
  • Agent-led dogfoods on real projects were not run in this release.

Static inventory and oracle signals

  • The Python static inventory follows the runner's discovery configuration: testpaths, python_files and norecursedirs (pytest.ini, pyproject [tool.pytest.ini_options]/[tool.pytest], tox.ini, setup.cfg) and never enters virtual environments. Before, eval fixture projects under evals/ were inventoried as Assertiva's own tests despite testpaths = ["tests"].
  • Weak-oracle signals recognize indirect oracles: same-module helper functions and methods (including same-module bases) that assert, assert*-named calls, test-double interaction assertions, explicit fail, and call guards (side_effect=AssertionError); assertIsNone / is None pin an exact value and are no longer existence-only. WEAK_ORACLE_SIGNAL lists each candidate's signal. On functional-test-designer the candidates went from 19 to 8 (the remaining ones are "must not raise" contracts the agent must judge), with no project-specific rule.

Qualification: CI green on 28c7f02 (validate, browser, java, Python 3.11); tag runtime self-qualification PASS (570 invocations natively, wheel build/install/import/tests/dependency closure).