fpf-thinking-map 2.1.0__tar.gz → 2.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fpf-thinking-map might be problematic. Click here for more details.

Files changed (25) hide show
  1. {fpf_thinking_map-2.1.0/fpf_thinking_map.egg-info → fpf_thinking_map-2.1.1}/PKG-INFO +3 -2
  2. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/README.md +2 -1
  3. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/checkpoint.py +45 -3
  4. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/verify.py +65 -0
  5. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1/fpf_thinking_map.egg-info}/PKG-INFO +3 -2
  6. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/pyproject.toml +1 -1
  7. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/LICENSE +0 -0
  8. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/NOTICE +0 -0
  9. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/__init__.py +0 -0
  10. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/agentic_structure.py +0 -0
  11. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/authorization.py +0 -0
  12. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/examples.py +0 -0
  13. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/guards.py +0 -0
  14. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/logic.py +0 -0
  15. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/move_intent.py +0 -0
  16. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/pending_input.py +0 -0
  17. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/primitives.py +0 -0
  18. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/py.typed +0 -0
  19. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/reachability.py +0 -0
  20. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/state.py +0 -0
  21. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map/traversal.py +0 -0
  22. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map.egg-info/SOURCES.txt +0 -0
  23. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map.egg-info/dependency_links.txt +0 -0
  24. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/fpf_thinking_map.egg-info/top_level.txt +0 -0
  25. {fpf_thinking_map-2.1.0 → fpf_thinking_map-2.1.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fpf-thinking-map
3
- Version: 2.1.0
3
+ Version: 2.1.1
4
4
  Summary: Deterministic Python runtime for lawful agent traversal with explicit state, evidence, authorization, waiting, and move identity.
5
5
  Author-email: "CONSOLIDARE CONTINUUM S.R.L." <info@consolidare-continuum.com>
6
6
  Maintainer-email: "CONSOLIDARE CONTINUUM S.R.L." <info@consolidare-continuum.com>
@@ -229,7 +229,8 @@ not a recording of a live model run and do not show later features.
229
229
  | v2.0.1 | Docs and metadata only; runtime identical to 2.0.0 |
230
230
  | v2.0.2 | Copyright and SPDX notices on every source file (license unchanged); includes traversal checkpoint and restore (`ADV-08`) |
231
231
  | v2.0.3 | Docs and metadata only; runtime identical to 2.0.2. Removes the upstream-intake advisory (`ADV-16`) and every named reference to the external specification this package was historically informed by; independence disclaimer reworded |
232
- | **v2.1.0** | Docs only; runtime identical to 2.0.3. Fixes a stale doc line claiming checkpoint/restore was unbuilt |
232
+ | v2.1.0 | Docs only; runtime identical to 2.0.3. Fixes a stale doc line claiming checkpoint/restore was unbuilt |
233
+ | **v2.1.1** | Checkpoint restore: `strict=True` now cross-references private counters (`evidence_added_at`, `state_visit_evidence`, `adjacency_clearances`, `confirmed_absent_percepts`) against the map's evidence registry — same referential-integrity contract already enforced on `binding.current_evidence`. Independent ADV-08 adversarial review for this cut: [`OPUS-4-7-ADV-08-REVIEW-2026-11-17.md`](docs/deep/OPUS-4-7-ADV-08-REVIEW-2026-11-17.md). Verify: 41/41 |
233
234
 
234
235
  History: [VERSION_TRACKER.md](docs/VERSION_TRACKER.md) · [CHANGELOG.md](CHANGELOG.md) · [Releases](https://github.com/Consolidare-Continuum/fpf-agentic-thinking-map/releases)
235
236
 
@@ -193,7 +193,8 @@ not a recording of a live model run and do not show later features.
193
193
  | v2.0.1 | Docs and metadata only; runtime identical to 2.0.0 |
194
194
  | v2.0.2 | Copyright and SPDX notices on every source file (license unchanged); includes traversal checkpoint and restore (`ADV-08`) |
195
195
  | v2.0.3 | Docs and metadata only; runtime identical to 2.0.2. Removes the upstream-intake advisory (`ADV-16`) and every named reference to the external specification this package was historically informed by; independence disclaimer reworded |
196
- | **v2.1.0** | Docs only; runtime identical to 2.0.3. Fixes a stale doc line claiming checkpoint/restore was unbuilt |
196
+ | v2.1.0 | Docs only; runtime identical to 2.0.3. Fixes a stale doc line claiming checkpoint/restore was unbuilt |
197
+ | **v2.1.1** | Checkpoint restore: `strict=True` now cross-references private counters (`evidence_added_at`, `state_visit_evidence`, `adjacency_clearances`, `confirmed_absent_percepts`) against the map's evidence registry — same referential-integrity contract already enforced on `binding.current_evidence`. Independent ADV-08 adversarial review for this cut: [`OPUS-4-7-ADV-08-REVIEW-2026-11-17.md`](docs/deep/OPUS-4-7-ADV-08-REVIEW-2026-11-17.md). Verify: 41/41 |
197
198
 
198
199
  History: [VERSION_TRACKER.md](docs/VERSION_TRACKER.md) · [CHANGELOG.md](CHANGELOG.md) · [Releases](https://github.com/Consolidare-Continuum/fpf-agentic-thinking-map/releases)
199
200
 
@@ -211,9 +211,6 @@ def _validate(semantic_map: "SemanticMap", cp: Any, strict: bool) -> None:
211
211
 
212
212
  evidence = cp["binding"].get("current_evidence", [])
213
213
  _require(_is_str_list(evidence), "current_evidence must be a list of strings")
214
- if strict:
215
- unknown = sorted(set(evidence) - set(semantic_map.evidence))
216
- _require(not unknown, f"evidence ids not registered on the map: {unknown}")
217
214
 
218
215
  step = active["step_count"]
219
216
  _require(isinstance(step, int) and not isinstance(step, bool) and step >= 0,
@@ -230,6 +227,17 @@ def _validate(semantic_map: "SemanticMap", cp: Any, strict: bool) -> None:
230
227
  sve = active["state_visit_evidence"]
231
228
  _require(isinstance(sve, dict) and all(isinstance(k, str) and _is_str_list(v) for k, v in sve.items()),
232
229
  "state_visit_evidence must map str -> list[str]")
230
+ ac = active["adjacency_clearances"]
231
+ _require(
232
+ isinstance(ac, dict) and all(isinstance(k, str) and _is_int_map(v) for k, v in ac.items()),
233
+ "adjacency_clearances must map str -> dict[str, int]",
234
+ )
235
+ cap = active["confirmed_absent_percepts"]
236
+ _require(
237
+ isinstance(cap, dict)
238
+ and all(isinstance(k, str) and (v is None or isinstance(v, str)) for k, v in cap.items()),
239
+ "confirmed_absent_percepts must map str -> str|None",
240
+ )
233
241
 
234
242
  for key in ("pending_authorizations", "consumed_authorizations"):
235
243
  _require(_is_str_list(active[key]), f"{key} must be a list of strings")
@@ -237,6 +245,40 @@ def _validate(semantic_map: "SemanticMap", cp: Any, strict: bool) -> None:
237
245
  for tid in list(active["pending_authorizations"]) + list(active["denied_authorizations"]):
238
246
  _require(tid in semantic_map.transitions, f"authorization names unknown transition {tid!r}")
239
247
 
248
+ if strict:
249
+ known_evidence = set(semantic_map.evidence)
250
+ unknown = sorted(set(evidence) - known_evidence)
251
+ _require(not unknown, f"evidence ids not registered on the map: {unknown}")
252
+ # Private counters carry evidence ids too (TTL anchors, state-visit
253
+ # evidence sets, cleared adjacency cells, confirmed-absent percept
254
+ # records). strict=True on current_evidence without the same check
255
+ # here let a crafted checkpoint reinject evidence memory for ids
256
+ # this map has never heard of — same referential-integrity contract,
257
+ # just on the private counters instead of the public field.
258
+ # strict=False stays the single escape hatch.
259
+ ghost_added_at = sorted(set(active["evidence_added_at"]) - known_evidence)
260
+ _require(
261
+ not ghost_added_at,
262
+ f"evidence_added_at references unregistered evidence ids: {ghost_added_at}",
263
+ )
264
+ sve_ghosts: set[str] = set()
265
+ for ids in active["state_visit_evidence"].values():
266
+ sve_ghosts.update(set(ids) - known_evidence)
267
+ _require(
268
+ not sve_ghosts,
269
+ f"state_visit_evidence references unregistered evidence ids: {sorted(sve_ghosts)}",
270
+ )
271
+ ac_ghosts = sorted(set(active["adjacency_clearances"]) - known_evidence)
272
+ _require(
273
+ not ac_ghosts,
274
+ f"adjacency_clearances references unregistered danger-percept evidence ids: {ac_ghosts}",
275
+ )
276
+ cap_ghosts = sorted(set(active["confirmed_absent_percepts"]) - known_evidence)
277
+ _require(
278
+ not cap_ghosts,
279
+ f"confirmed_absent_percepts references unregistered evidence ids: {cap_ghosts}",
280
+ )
281
+
240
282
  trace = active["trace"]
241
283
  _require(isinstance(trace, dict), "trace must be a dict")
242
284
  last = trace.get("last_transition_id")
@@ -1738,6 +1738,67 @@ def check_traversal_checkpoint():
1738
1738
  bad(lambda c: None, MapFingerprintMismatch)
1739
1739
 
1740
1740
 
1741
+ def check_checkpoint_strict_private_counter_refs():
1742
+ """strict=True also enforces referential integrity on the private
1743
+ counters (`evidence_added_at`, `state_visit_evidence`,
1744
+ `adjacency_clearances`, `confirmed_absent_percepts`). Post-review
1745
+ finding 2026-11-17: strict used to check only `binding.current_evidence`
1746
+ against the map's evidence registry; a crafted checkpoint could slip
1747
+ evidence memory for ids the map has never heard of through the private
1748
+ counters. strict=False stays the escape hatch for a harness that
1749
+ deliberately carries unregistered tokens."""
1750
+ import copy
1751
+ from fpf_thinking_map.checkpoint import InvalidCheckpointState
1752
+
1753
+ sm = SemanticMap()
1754
+ sm.register_context(ContextPrimitive("ctx", "C"))
1755
+ sm.register_evidence(EvidencePrimitive("ev", "E", "ctx", Freshness.CURRENT))
1756
+ sm.register_transition(TransitionPrimitive("t", "T", "ctx", "a", "b"))
1757
+ engine = ThinkingMapTraversal(sm)
1758
+ s = engine.build_active_state(
1759
+ RuntimeBinding(active_context_id="ctx", current_evidence=["ev"]),
1760
+ current_state="a",
1761
+ )
1762
+ base = s.checkpoint()
1763
+
1764
+ def expect(mutate, needle):
1765
+ c = copy.deepcopy(base)
1766
+ mutate(c)
1767
+ try:
1768
+ ActiveState.from_checkpoint(sm, c, strict=True)
1769
+ except InvalidCheckpointState as exc:
1770
+ assert needle in str(exc), f"wrong message for {needle!r}: {exc}"
1771
+ return
1772
+ raise AssertionError(f"strict mode accepted a ghost {needle!r} reference")
1773
+
1774
+ expect(
1775
+ lambda c: c["active"]["evidence_added_at"].update({"ghost_ev": 0}),
1776
+ "evidence_added_at references unregistered evidence ids",
1777
+ )
1778
+ expect(
1779
+ lambda c: c["active"]["state_visit_evidence"].update({"ctx:a": ["ev", "ghost_ev"]}),
1780
+ "state_visit_evidence references unregistered evidence ids",
1781
+ )
1782
+ expect(
1783
+ lambda c: c["active"]["adjacency_clearances"].update({"ghost_percept": {"cell": 1}}),
1784
+ "adjacency_clearances references unregistered danger-percept evidence ids",
1785
+ )
1786
+ expect(
1787
+ lambda c: c["active"]["confirmed_absent_percepts"].update({"ghost_percept": None}),
1788
+ "confirmed_absent_percepts references unregistered evidence ids",
1789
+ )
1790
+
1791
+ # strict=False must still accept them: the escape hatch stays
1792
+ # honest about which harness opts out.
1793
+ relaxed = copy.deepcopy(base)
1794
+ relaxed["active"]["evidence_added_at"]["ghost_ev"] = 0
1795
+ relaxed["active"]["adjacency_clearances"]["ghost_percept"] = {"cell": 1}
1796
+ assert isinstance(
1797
+ ActiveState.from_checkpoint(sm, relaxed, strict=False),
1798
+ ActiveState,
1799
+ )
1800
+
1801
+
1741
1802
  def check_move_intent():
1742
1803
  """MoveIntent/inspect_move: a concrete proposed move, distinct from its
1743
1804
 
@@ -2691,6 +2752,10 @@ def main():
2691
2752
  ("pending input / AWAIT (distinct from IDLE)", check_pending_input_await),
2692
2753
  ("move intent / inspect_move (concrete move identity)", check_move_intent),
2693
2754
  ("traversal checkpoint (round-trip fidelity, fail-closed restore)", check_traversal_checkpoint),
2755
+ (
2756
+ "traversal checkpoint (strict private-counter referential integrity)",
2757
+ check_checkpoint_strict_private_counter_refs,
2758
+ ),
2694
2759
  ("reachability (discrete graph analysis, val.pdf ch.10)", check_reachability),
2695
2760
  ("shortest_path_distance (BFS hop count: 0, N, None unreachable)", check_shortest_path_distance),
2696
2761
  (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fpf-thinking-map
3
- Version: 2.1.0
3
+ Version: 2.1.1
4
4
  Summary: Deterministic Python runtime for lawful agent traversal with explicit state, evidence, authorization, waiting, and move identity.
5
5
  Author-email: "CONSOLIDARE CONTINUUM S.R.L." <info@consolidare-continuum.com>
6
6
  Maintainer-email: "CONSOLIDARE CONTINUUM S.R.L." <info@consolidare-continuum.com>
@@ -229,7 +229,8 @@ not a recording of a live model run and do not show later features.
229
229
  | v2.0.1 | Docs and metadata only; runtime identical to 2.0.0 |
230
230
  | v2.0.2 | Copyright and SPDX notices on every source file (license unchanged); includes traversal checkpoint and restore (`ADV-08`) |
231
231
  | v2.0.3 | Docs and metadata only; runtime identical to 2.0.2. Removes the upstream-intake advisory (`ADV-16`) and every named reference to the external specification this package was historically informed by; independence disclaimer reworded |
232
- | **v2.1.0** | Docs only; runtime identical to 2.0.3. Fixes a stale doc line claiming checkpoint/restore was unbuilt |
232
+ | v2.1.0 | Docs only; runtime identical to 2.0.3. Fixes a stale doc line claiming checkpoint/restore was unbuilt |
233
+ | **v2.1.1** | Checkpoint restore: `strict=True` now cross-references private counters (`evidence_added_at`, `state_visit_evidence`, `adjacency_clearances`, `confirmed_absent_percepts`) against the map's evidence registry — same referential-integrity contract already enforced on `binding.current_evidence`. Independent ADV-08 adversarial review for this cut: [`OPUS-4-7-ADV-08-REVIEW-2026-11-17.md`](docs/deep/OPUS-4-7-ADV-08-REVIEW-2026-11-17.md). Verify: 41/41 |
233
234
 
234
235
  History: [VERSION_TRACKER.md](docs/VERSION_TRACKER.md) · [CHANGELOG.md](CHANGELOG.md) · [Releases](https://github.com/Consolidare-Continuum/fpf-agentic-thinking-map/releases)
235
236
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fpf-thinking-map"
3
- version = "2.1.0"
3
+ version = "2.1.1"
4
4
  description = "Deterministic Python runtime for lawful agent traversal with explicit state, evidence, authorization, waiting, and move identity."
5
5
  readme = "README.md"
6
6
  license = "MIT"