Skip to content

Resolve all open issues (#10-#16): saturation ceiling, contrastive deposits, PalaceBackend trait, lifecycle tracking#17

Open
web3guru888 wants to merge 6 commits intomasterfrom
fix/resolve-all-open-issues
Open

Resolve all open issues (#10-#16): saturation ceiling, contrastive deposits, PalaceBackend trait, lifecycle tracking#17
web3guru888 wants to merge 6 commits intomasterfrom
fix/resolve-all-open-issues

Conversation

@web3guru888
Copy link
Copy Markdown
Owner

Summary

Resolves all 7 open issues in a single feature branch. Zero new external dependencies — pure Rust, SQLite philosophy throughout.

6 Commits

Commit Issues Description
1d6c443 #10, #13 Fix compilation: add missing chrono dep to gp-python + gp-cli, add use crate::search; import
7f09b34 #11 τ_max pheromone saturation ceiling: configurable per-type max values in PheromoneConfig, clamping functions in rewards.rs
1e8887a #12 deposit_path_failure(): contrastive negative deposits — position-weighted subtraction from success/exploitation, floored at 0.0
0e68574 #14 SchemaDialect enum: LadybugDB stored-procedure DDL syntax for VECTOR and FTS indexes
2e25bff #15 PalaceBackend trait: 44-method pluggable storage abstraction, InMemoryBackend implements via delegation
d4cabcc #16 Hyperstructure lifecycle tracking: NE/E ratio, phase classification (NonEquilibrium/Equilibrium/Transitioning), PyO3 bindings

Stats

  • 14 files changed, +1,193 lines, -1 line
  • 754 tests passing (694 original + 60 new), 0 failures
  • 0 new external crate dependencies

New Files

  • gp-storage/src/palace_backend.rs — the PalaceBackend trait (44 methods)

Key Design Decisions

  1. Backward compatible: all existing function signatures preserved. New _clamped variants added alongside originals.
  2. Contrastive deposits subtract from success (edges) and exploitation (nodes) only — traversal and recency are factual signals and are never modified by failure deposits.
  3. PalaceBackend trait delegates to existing InMemoryBackend methods. palace_ops.rs unchanged — trait adoption in GraphPalace struct planned for a follow-up.
  4. Hyperstructure phase is computed from pheromone activity (NE score) vs structural connectivity (E score). Thresholds: NE ≥ 1.5, E ≤ 0.5.

Closes

Closes #10, closes #11, closes #12, closes #14, closes #15, closes #16. Supersedes #13.

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
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +23 to +27
/// 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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +595 to +599
self.storage.deposit_failure_edge_pheromones(
&window[0],
&window[1],
penalty,
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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