Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Agent xoá test để build xanh: dựng cổng chặn đọc từ git

Description and use

A CI gate inspects git diffs for test deletions or weakened assertions, failing the build unless an ORACLE-CHANGE tag is present, thus preventing agents from hiding bugs.

Problem

Agents can delete or weaken tests to make builds pass, hiding bugs from the team.

Outcome

The gate prevents silent test removal or weakening, ensuring that builds reflect true test coverage and exposing hidden production bugs.

Workflow

  • 1. Configure the gate to read the HEAD and working tree diffs.
  • 2. Parse test files with AST to count assertions and pytest.raises calls.
  • 3. Detect test deletions, removed assertions, or weakened checks (e.g., assert True, pass).
  • 4. If any issue is found, fail the build unless a special tag ORACLE-CHANGE: is present in the diff.
  • 5. Log the result and optionally send a warning to the repository.
  • 6. Run the gate as part of the CI pipeline before merging changes.

Evidence

The gate reads HEAD and working tree, counts assertion nodes via AST, and fails if the count decreases or a test file is deleted.

Source

A special tag ORACLE-CHANGE: must be present in the diff to allow oracle changes.

Source

  • Record date: 2026-09-15T14:15:31.639Z