Skip to content

Facade audit: a BorrowedDatabase (a database handle borrowed from a statement) gets the same false invalidation violation #1834 fixed for the failed-state type #1977

Closed

Description

@ehartford

Found by the #1834 fix (d95a7d9, wave-cimport). facade_type_holds_resource now counts a failed-state type as holding the modeled resource, so audit:all no longer flags errmsg on it. A borrowed handle (st.database() → BorrowedDatabase) can hit the same false audit violation, but fixing it the same way would also change ACCEPTANCE: let b = st.database().unwrap(); st.step(); b.changes() is rejected today and would be accepted.

Coordinator's reading of D51 (canon): the ruling's test is what happens if this inference is wrong? — whether step invalidates a borrowed database handle may not be inferred from the type's shape, because inferring 'not invalidated' can create unsafety. So acceptance must not change by classification; if step does not invalidate the borrowed handle (true for sqlite3_db_handle), the SQLite facade states it with an explicit clause, and the audit reads the same fact acceptance reads (one owner). Fix: (1) the audit must not report a violation acceptance does not (if it does today, that is the bug); (2) if the facade grammar has a clause for 'this borrowed resource is not invalidated by this call', use it in the SQLite facade; if it has none, stop and brief Eric — that is a D51 gap only he rules on.

Activity

  1. added
    bug
    on Oct 3, 2026
  2. ehartford commented on Oct 3, 2026

    @ehartford
    ContributorAuthor

    Fixed on main in c884c1c (stack #2001 → #2010, seed-driven battery GREEN on b932ef6, tree identical to main). Fixture coverage is in the stack's commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions