pg-reimplements-network-in-sql
OUT premise
`PgApi` reimplements the in-memory `Network`'s algorithms (BFS propagation, entrenchment scoring, nogood resolution, dialectical operations) directly in SQL rather than delegating to the `Network` class.
Summary
The PostgreSQL implementation duplicates all the core reasoning algorithms — like how beliefs propagate, how conflicts get resolved, and how strongly held each belief is — by encoding them directly as SQL queries instead of reusing the existing in-memory logic. This matters because it means two separate implementations of the same algorithms need to be kept in sync, and bugs or behavior differences between them could cause the system to reach different conclusions depending on which backend is used. However, this belief is currently marked as retracted, suggesting this characterization may no longer be accurate or was found to be incorrect.
Dependents
These beliefs depend on this one:
- pgapi-achieves-implementation-parity — PgApi achieves full behavioral parity with the in-memory Network implementation: it reimplements the core algorithms (entrenchment scoring, nogood resolution, BFS propagation, dialectics) in SQL with BFS propagation executed in application-level Python.
- pgapi-is-complete-sql-reimplementation — PgApi is a complete SQL-native reimplementation of the in-memory Network: it re-implements core algorithms (BFS propagation, entrenchment scoring, nogood resolution) directly in SQL with multi-tenant composite keys and per-method transaction semantics, achieving full behavioral parity.
Details
| Source | entries/2026/04/29/reasons_lib-pg.md |