chore(clients): add CHECKPOINT_TOPIC constant to mempal-fast.py#14
Open
jphein wants to merge 1 commit intorboarescu:mainfrom
Open
chore(clients): add CHECKPOINT_TOPIC constant to mempal-fast.py#14jphein wants to merge 1 commit intorboarescu:mainfrom
jphein wants to merge 1 commit intorboarescu:mainfrom
Conversation
Mirrors the constant already in `clients/hook.py`. Both hook clients write the same topic value (`"checkpoint"`); centralizing it in a constant per file keeps the canonical name in one place per client rather than three inline strings spread across two files. The clients/hook.py constant has lived in upstream main since PR #4's cherry-pick (`ef6ac03`). This brings clients/mempal-fast.py into the same shape — small refactor, no behavior change. `+8 / -1`. Sending standalone per the "small separate PRs" preference noted on PR #4.
jphein
added a commit
to jphein/palace-daemon
that referenced
this pull request
Apr 27, 2026
…C) + Copilot-fix backport note
There was a problem hiding this comment.
Pull request overview
Adds a per-file constant for the checkpoint diary topic in mempal-fast.py, aligning it with the existing pattern in clients/hook.py and removing an inline "checkpoint" string from the request payload.
Changes:
- Introduce
CHECKPOINT_TOPIC = "checkpoint"near the top ofclients/mempal-fast.py. - Replace the inline
"topic": "checkpoint"payload field with"topic": CHECKPOINT_TOPIC. - Add explanatory comments documenting why the constant must match
clients/hook.py.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
CHECKPOINT_TOPIC = \"checkpoint\"constant at the top ofclients/mempal-fast.pyand replaces the inline\"topic\": \"checkpoint\"inmain()with it.Why
clients/hook.pyalready declares this constant — see line 39 in currentmain:Both hook clients (
hook.pyandmempal-fast.py) write the same topic value totool_diary_write. Centralizing it in a per-file constant keeps the canonical name in one place per client rather than scattered as inline strings, so a future rename only touches the two declarations.The mempal-fast.py side just hadn't been brought into the same shape yet.
Scope
+8 / -1. Single file. No behavior change — same string value gets posted, just sourced from a constant. No new dependencies.Originally fork commit
dd8894c(added the constants to both client files at once); that commit's hook.py half landed via PR #4's cherry-pick, the mempal-fast.py half didn't make it into the final cherry-pick. This brings them in line.