Skip to content

fix(sensorium): gate stale pointers and add volunteer cards - #48

Closed
TKCen wants to merge 2 commits into
mainfrom
fix/pointer-outbox-gates
Closed

fix(sensorium): gate stale pointers and add volunteer cards#48
TKCen wants to merge 2 commits into
mainfrom
fix/pointer-outbox-gates

Conversation

@TKCen

@TKCen TKCen commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve the live Sensorium pointer/backoff/saved-residue gate repairs on a clean branch
  • classify historical prepared context-pointers as settled/non-actionable in dashboard snapshot/runtime/trace surfaces
  • add compact volunteer cards/status orientation helpers and docs
  • update plugin registration tests for the split tool surface

Verification

  • pytest -q

Cleanup context

This is the first upstream-preservation slice from the dirty live checkout checkpoint backup/sensorium-dirty-20260708-154949 / stash@{0}.

TKCen added 2 commits July 8, 2026 15:52
Preserve the live Sensorium pointer/outbox repairs on a clean branch.\n\n- add foreground pointer backoff/relevance gates and saved-residue doorway handling\n- classify historical prepared context-pointers as settled/non-actionable in dashboard surfaces\n- add compact volunteer cards/status orientation helpers\n- update plugin registration/tests/docs for the split tool surface\n\nVerification:\n- pytest -q
Verification:\n- ruff check agent_sensorium tests\n- pytest -q

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

Copy link
Copy Markdown

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: 8600e64da9

ℹ️ 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 thread agent_sensorium/tools.py
Comment on lines +1100 to +1103
is_saved_residue = (
candidate.get("status") == "archived"
and decision in {"SAVE", "PROMOTE_CONSCIOUS"}
and settlement.get("intake_task_id")

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 Classify reviewed SAVE settlements as saved residue

When a candidate is settled via apply_kanban_settlement with SAVE or PROMOTE_CONSCIOUS, agent_sensorium/settlement.py marks it reviewed, not archived. Because this exact-subject branch only recognizes archived rows, sensorium(action='status', reference_id=<saved candidate>) returns kind: candidate and omits kanban_settlement for the normal saved-settlement path, even though volunteer cards/pointers surface the same row as saved residue. This breaks the new reference-id recovery path for ordinary Kanban-saved candidates; key this off the settlement metadata or include reviewed here.

Useful? React with 👍 / 👎.

Comment on lines +299 to +303
last_presented = next(
(
receipt for receipt in reversed(prior_presented)
if receipt.get("pointer_type") in {"candidate", "saved_residue"}
),

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 Scope min-turn gap to the current session

When two live sessions share the same Sensorium store, this min-turn-gap check looks at the last candidate/saved-residue pointer from any session, while current_turn_index is computed per session_id. A receipt from another session at turn 5 can therefore suppress a relevant pointer on turn 1 of a new session (1 - 5 < min_turn_gap) even though that session has not seen a card yet. Filter this lookup to session_receipts when session_id is present so one conversation cannot starve another.

Useful? React with 👍 / 👎.

Comment thread dashboard/plugin_api.py
Comment on lines +3366 to +3370
res = apply_media_gift_choice(
store=store,
decision=decision,
why_now=why_now,
artifact_id=artifact_id,

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 Reject triage for unknown artifacts

For decline, choose_silence, and block_delivery, apply_media_gift_choice does not require artifact_id to exist, and _update_artifact_delivery_state silently no-ops if it does not. A typo in /artifacts/{artifact_id}/triage therefore returns success and writes a decision receipt against a nonexistent artifact while the intended held artifact remains held. Check that the artifact exists before applying these choices, not only on approve_delivery.

Useful? React with 👍 / 👎.

Comment thread dashboard/plugin_api.py
Comment on lines +505 to +509
allowed_prefixes = [
Path("/home/entity/.hermes").resolve(),
Path("/home/entity/.gemini/antigravity-cli/scratch").resolve(),
Path("/tmp").resolve(),
]

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 Trust the active Hermes home for artifact verification

This verifier only trusts /home/entity/.hermes, but the dashboard and store default to Path.home() / ".hermes". In deployments/tests running under another account (for example /root/.hermes, a macOS home, or a service user), legitimate held text/image artifacts under the actual Hermes state tree are reported as UNVERIFIED/security_warning instead of VERIFIED_COMPLIANT. Build the allowed prefix from Path.home()/DEFAULT_ROOT rather than hard-coding one username.

Useful? React with 👍 / 👎.

Comment thread dashboard/plugin_api.py
Comment on lines +1823 to +1827
try:
from agent_sensorium.inner_life import signal_inbox_lineage_violations

raw_violations = signal_inbox_lineage_violations(
{"version": 2, "blocks": blocks_obj},

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 Wire topology lineage to an implemented checker

This import is never satisfiable in this commit because agent_sensorium.inner_life does not define signal_inbox_lineage_violations, and the broad except then makes every /topology response report signal_inbox_lineage.ok=false with lineage_checker_unavailable. As a result, configured sensor-to-signal_inbox gaps are never actually checked and operators only see a missing-checker diagnostic. Add/export the checker or call an existing implemented API here.

Useful? React with 👍 / 👎.

Comment thread dashboard/plugin_api.py
Comment on lines +527 to +529
with open(resolved_path, "r", encoding="utf-8", errors="ignore") as f:
line1 = f.readline()
line2 = f.readline()

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 Bound artifact header reads

For allowed text/image artifacts, readline() without a size limit can read an entire file when the file has no early newline. Since artifact refs can point at regular files under /tmp, one large one-line file is enough to make /snapshot allocate a huge string or stall while merely checking the two required header markers. Read a bounded prefix/header instead of unbounded lines.

Useful? React with 👍 / 👎.

@TKCen

TKCen commented Jul 19, 2026

Copy link
Copy Markdown
Owner Author

Closing this stale broad branch rather than reviving it. Its accepted feature slices were integrated through the later #49-#58 train, while the branch itself is now conflicting and carries unresolved P1/P2 findings. The still-relevant current-main pointer continuity findings are repaired narrowly in #68, and the remaining generic dashboard/profile boundary findings are repaired narrowly in #69. This preserves the useful intent without merging the obsolete 4,700-line proposal.

@TKCen TKCen closed this Jul 19, 2026
@TKCen
TKCen deleted the fix/pointer-outbox-gates branch July 19, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant