Resolve all open issues (#10-#16): saturation ceiling, contrastive deposits, PalaceBackend trait, lifecycle tracking#17
Conversation
Prevents uniform convergence by clamping deposits to configurable per-type maximums. Addresses DPPN failure mode analysis. Closes #11
Negative pheromone deposits for dead-end/failed paths. Subtracts from success (edges) and exploitation (nodes), floored at zero. Traversal and recency are preserved as factual signals. Exposed via Palace API and PyO3 bindings. Closes #12
Adds LadybugDb dialect with stored-procedure syntax for VECTOR and FTS index creation. Original Cypher syntax preserved unchanged. Node and relationship table DDL is shared across dialects. Closes #14
Defines 44-method PalaceBackend trait covering all palace operations. InMemoryBackend implements it via delegation. Opens path to LadybugDB disk backend. Closes #15
Implements biological hyperstructure phase classification per Norris (2011). Each node is classified as Non-Equilibrium (active pheromone maintenance), Equilibrium (stable structure), or Transitioning based on its pheromone-to-connectivity ratio. Palace-wide lifecycle summary provides global NE/E ratio and per-node metrics. Exposed via PyO3. Closes #16
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4cabcc6d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// Maximum exploitation pheromone value (τ_max). Default 5.0. | ||
| pub exploitation_max: f64, | ||
| /// Maximum exploration pheromone value (τ_max). Default 3.0. | ||
| pub exploration_max: f64, | ||
| /// Maximum success pheromone value (τ_max). Default 5.0. |
There was a problem hiding this comment.
Preserve backward-compatible config deserialization
These added pheromone ceiling fields are required by default during Deserialize, so older saved GraphPalaceConfig JSON (which lacks them) will fail to parse. In practice this causes upgrade regressions: when serde_json::from_str::<GraphPalaceConfig> fails, the CLI falls back to defaults and silently drops previously persisted tuning values instead of preserving existing config.
Useful? React with 👍 / 👎.
| self.storage.deposit_failure_edge_pheromones( | ||
| &window[0], | ||
| &window[1], | ||
| penalty, | ||
| ); |
There was a problem hiding this comment.
Apply position weighting to failure edge penalties
This loop applies the full penalty to every edge in the failed path, which over-penalizes long paths and makes behavior inconsistent with the new core failure algorithm (gp_stigmergy::rewards::deposit_path_failure) that scales by edge position. As written, failure deposits through GraphPalace/Python produce stronger-than-intended suppression on later edges.
Useful? React with 👍 / 👎.
Summary
Resolves all 7 open issues in a single feature branch. Zero new external dependencies — pure Rust, SQLite philosophy throughout.
6 Commits
1d6c443chronodep togp-python+gp-cli, adduse crate::search;import7f09b34PheromoneConfig, clamping functions inrewards.rs1e8887adeposit_path_failure(): contrastive negative deposits — position-weighted subtraction from success/exploitation, floored at 0.00e68574SchemaDialectenum: LadybugDB stored-procedure DDL syntax for VECTOR and FTS indexes2e25bffPalaceBackendtrait: 44-method pluggable storage abstraction,InMemoryBackendimplements via delegationd4cabccStats
New Files
gp-storage/src/palace_backend.rs— thePalaceBackendtrait (44 methods)Key Design Decisions
_clampedvariants added alongside originals.success(edges) andexploitation(nodes) only —traversalandrecencyare factual signals and are never modified by failure deposits.InMemoryBackendmethods.palace_ops.rsunchanged — trait adoption inGraphPalacestruct planned for a follow-up.Closes
Closes #10, closes #11, closes #12, closes #14, closes #15, closes #16. Supersedes #13.