Skip to content

Stop telling the owner an approval failed when another poller settled it - #82

Merged
ThinkOffApp merged 1 commit into
mainfrom
fix/no-false-unknown-intent-reply
Aug 30, 2026
Merged

ThinkOffApp merged 1 commit into
mainfrom
fix/no-false-unknown-intent-reply

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Petrus tapped Approve twice this morning and was told twice that it had not worked. Both times it had.

84967c40 — created 11:19:03, decided 11:21:20, approve. The approved command ran: caffeinate -dimsu -t 10800 is PID 42702 on the MacBook right now.
b69eaa2c — created 11:22:57, decided 11:23:15, approve. He re-tapped it at 11:23:51 because of the false message, and got the same reply again.

Cause: more than one machine runs startChatReplyPoller against the same room, and each keeps its own intent store. The poller holding the intent settles it; every other poller sees an id it never created and posts was NOT recorded — no intent with that id. So the machine that did nothing contradicts the machine that did the work.

A false failure is worse than silence here: it makes a working approval look broken and sends the owner round the loop re-tapping settled items.

Change: the unknown-id branch logs and stays silent. The genuinely-expired case loses its notice — the cheaper error, since nothing happens and the pending list still shows the truth. A comment records the condition for restoring a reply: when a poller can distinguish 'expired' from 'belongs to another poller'.

Untouched: the authorization branch. A human refused because they are not an owner still gets told visibly — that was codexmb's merge-blocking finding on #76 and it still holds.

Verification: new test asserts zero posts and one log line for an unheld id. I confirmed it fails against the unpatched source and passes with the fix, so it is a real gate rather than a passing assertion. Full suite: 285 pass, 0 fail.

Worth a look from @codexmb.

…wns it

petrus tapped Approve on 84967c40 and again on b69eaa2c this morning. Both
were recorded and settled (decision=approve, seconds after each tap) by the
poller holding them - and a second poller replied 'was NOT recorded - no
intent with that id' to each. He re-tapped b69eaa2c because of that message
and was told the same thing again.

More than one machine runs startChatReplyPoller against the same room, and
each keeps its own intent store. 'Unknown to me' therefore does not mean
unknown: the poller that owns the intent settles it while every other poller
sees an id it has never heard of, and then contradicts the machine that just
did the work.

The unknown-id branch now logs and stays silent. The genuinely-stale case
loses its notice, which is the cheaper error - nothing happens, and the
pending list still shows the truth. Restore a reply here only once a poller
can tell 'expired' apart from 'belongs to another poller'.

The authorization branch is untouched: a human whose tap is refused because
they are not an owner still gets told, visibly, as before.

Test asserts zero posts and one log line for an unheld id. Verified it fails
against the unpatched source and passes with it; full suite 285 pass, 0 fail.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-30T08:29:15.402175Z 7c0505a Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 7c0505a701

ℹ️ 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".


export INTENT_API_BASE="$(python3 -c "import json;print(json.load(open('$CONFIG'))['intent']['baseUrl'])")"
export INTENT_API_KEY="$(python3 -c "import json;print(json.load(open('$CONFIG'))['intent']['apiKey'])")"
export INTENT_USER_ID="claudemm"

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 Publish heartbeats under the configured human user

When this Mac mini wrapper runs, INTENT_USER_ID equals the agent handle rather than the human account, so uik-daemon writes the device and agent heartbeats under /intent/claudemm/... while the canonical configuration and dashboard use petrus. The daemon itself identifies this exact pairing as a misconfiguration that silently creates a different user document; consequently Petrus's real Mac mini slot remains stale even though this process appears healthy. Read intent.userId from dogfood.json alongside the base URL and API key instead of hardcoding the agent identity.

Useful? React with 👍 / 👎.

@ThinkOffApp
ThinkOffApp merged commit 383659d into main Aug 30, 2026
3 checks passed
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