Skip to content

intent-gate v0.5.0 — lint contract disclosure + L9 path-isolation gate

Choose a tag to compare

@baixinghao baixinghao released this 11 Aug 19:08
· 16 commits to main since this release

Highlights

  • Lint contract disclosure: lint_summary reports now embed a "mechanical judgment contract" section, interpolated directly from the lint constants (L1 keyword list, L4 anchor regex, L6 write/read vocab, L7 mapping-row format, L9 rules) — no more trial-and-error guessing at what the gate checks.
  • New L9 path-isolation gate (CRITICAL): DDL (CREATE TABLE) embedded inside summary.md is rejected, and declaring a sql/ path with no SQL files on disk is blocked. The "SQL only lives in project-root sql/" rule finally has a mechanical half (previously L6 silently went blind when sql/ was empty).

Rule fixes (from red-team review)

  • L1: success-terminal keyword list extended with 已完结 / 已通过 (e.g. 放款中 --> 已完结 --> [*] now passes); bare 完成 / 结束 intentionally not accepted.
  • L4: anchor regex no longer swallows / § () as keyword tails — §3.2 / §5.1 multi-anchor cells parse independently; contiguous §3.2/§5.1 no longer merges/leaks.
  • L6: write vocab gains 保存 新增, read vocab gains 读取 获取; case-insensitive matching; CREATE TABLE detection now optional-backtick and case-insensitive.
  • L7: mapping-table first column accepts both bare numbers and Q-prefixed (Q1) forms.

Playbook

  • §3.4: explicit 🔴 rule — DDL statements must not be embedded in summary.md, only in project-root sql/.

Tests

  • ContractDisclosureTests: asserts the report contract section is interpolated from the live constants (anti-drift).
  • New antibody tests for L1/L4/L6/L7 fixes and the L9 path-isolation cases (embedded DDL, empty sql/, mysql/ false-positive guard).