Repository navigation
fix(plugin): self-heal the Ping header on SessionStart - #691
Conversation
An install made before the x-context-guru-ping header existed never got it, and a restart could not add it. The Ping button then failed with "restart Claude Code". - settings.py: new ensure-ping-header command. It adds the header to the settings file that holds our routing, and records it so uninstall removes it. - settings.py add: record ping_header_opt_out for --no-ping-header. SessionStart does not heal an opted-out install. - start-proxy.sh: call ensure-ping-header and print one note. - hooks/model.ts: say the true action for "not opted in". - doctor: report whether the ping header is set. Closes #685 Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
OsherElhadad
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (claude, user of @OsherElhadad) | Claude Code 2.1.310 | offload-review skill, @OsherElhadad's session | fresh | 2 of 2 | 1 of 2 | 542df902d352 |
blocking |
Verdict: blocking
Findings
-
context-guru-plugin/scripts/settings.py:3063 — the heal turns Ping on for users who opted out on v0.5.4, without consent
- What fails:
--no-ping-headershipped in 328064e (#667, tag v0.5.4). An install made with it on v0.5.4 has ourinstalled_base_url, no ping line, noinstalled_ping_headerand noping_header_opt_out(that key is new in this PR).ping_header_statereturnsmissingfor it, and the next SessionStart writesx-context-guru-ping: 1. The user's explicit opt-out is reversed. - Also: install.sh prints the consent text
ping_note=(what the server keeps in memory, for how long, how to opt out) every time it writes the header (install.sh:1243-1247). The heal prints only "Ping enabled for this install; it works from your next session". So users who never saw the consent now have their latest request body and key held in memory (docs/data-dependence.md:215, "Without the header nothing is held"). - Data dependence: the PR body says "Data dependence: none". This is not correct. For each healed install the change turns on holding the body and key for the button. CLAUDE.md asks to say this at the top of the PR, update docs/data-dependence.md, and get the "Decided by" person to confirm.
- Proof: trace
ensure-ping-headeron{"env":{"ANTHROPIC_BASE_URL":U},"$context-guru":{"installed_base_url":U}}. This is the exact output of a v0.5.4add --no-ping-header(the v0.5.4cmd_addwrites no opt-out key).ping_header_state→missing→add_ping_header→save→healed. Nothing tells a v0.5.4 opt-out apart from a pre-#667 install. - Fix: at least print the full consent text (the same words as
ping_note=) with the opt-out command when the hook heals. Better: heal only installs that are older than #667, if some marker shows that. Otherwise, state the trade-off in the PR and in docs/data-dependence.md, and get it confirmed.
- What fails:
-
context-guru-plugin/scripts/settings.py:2906-2918 — the documented opt-out does not remove a healed header
- What fails: the consent text says "To opt out, re-run the install with --no-ping-header". After a heal, the file has the ping line and
installed_ping_header. A re-run with--no-ping-headergoes to thecompletedbranch. That branch callsrecord_ping_choice(meta, False)and setsping_header_opt_out: true, but it never removes the line. Result: the header still goes out, the record says "opted out", anddoctorhides the check (opted-outis not in("present", "missing"), cg.py:678). The user believes they opted out, but the server still holds the body and key. - Proof:
cmd_addwithping_on=False: theunchangedtest fails on the new clause (no opt-out record yet), so the code goes toif current == args.url:. That branch hasif ping_on and add_ping_header(...)and no removal.remove_ping_headeris called only fromcmd_remove. The same holds in therepointedand fresh branches. Before this PR the gap was rare; the heal now puts the line into every older install, so the gap matters. - Fix: when
ping_onis false andmeta[installed_ping_header] == PING_HEADER, callremove_ping_header(env, meta)in all three write branches. Add a test: heal, thenadd --no-ping-header, then assert no ping line andping_header_opt_out: true.
- What fails: the consent text says "To opt out, re-run the install with --no-ping-header". After a heal, the file has the ping line and
Non-blocking
- start-proxy.sh:332 starts python3 at every routed SessionStart. Section (0b) above it first uses a
grepso it does not start python3 in the common case. Agrep -qs '"installed_ping_header"\|"ping_header_opt_out"'pre-check here would keep the hook cheap after the first heal. - settings.py:3088-3092:
envmerges per key across scopes. If our routing is in the user file but the projectsettings.jsonsets its ownANTHROPIC_CUSTOM_HEADERS, the healed user-scope line is hidden. Doctor then sayspresent, but the session does not send it. This is rare; a note in doctor's text could help. - settings.py:2899: a plain
add --no-ping-headerre-run on an older opted-out file now takes thecompletedbranch withadded_keys="". It also makes a new backup, and the note "filled in the keys that were missing" is misleading.
What I checked
- The full diff of 542df90 (8 files) and the commit message.
cmd_addin full (all four branches),add_ping_header,remove_ping_header,with_ping_header,cmd_removemeta cleanup.- start-proxy.sh order: the (0b) status-line repoint, the port gate and the routing gate before (1a);
notegoes to stdout; the fail-open|| ph_out_="". cmd_ensure_ping_header: the file list, the realpath de-dup, the state rule,--check, exit 0 on all paths.- install.sh
R_NOPINGandping_noteconsent; the #667 history (328064e, tag v0.5.4). - docs/data-dependence.md rows for Keep-alive and
5-min-ping. - The doctor check in both cg.py copies (they are the same); the model.ts text and its test.
- All 8 new Go tests and the plugin_test.go fixture change. Go is not run (not approved).
OsherElhadad
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (claude, user of @OsherElhadad) | Claude Code 2.1.310 | offload-review skill, @OsherElhadad's session | fresh | 1 of 2 | 1 of 2 | 542df902d352 |
blocking |
Verdict: blocking
Findings
-
context-guru-plugin/scripts/settings.py:3073 — the heal turns on Ping for users who already opted out with
--no-ping-header- What fails: a user installs with
--no-ping-headeron v0.5.4 (#667) or any build up to this PR. Thataddwrote no record of the choice. The file looks the same as an install from before the header. The next SessionStart returnsmissingand addsx-context-guru-ping: 1. From then on the proxy holds that user's last body and key, against their explicit choice. - Proof: before this PR,
cmd_addwith--no-ping-headeronly skippedadd_ping_header. It wrote onlyinstalled_base_urlinto$context-guru.ping_header_state(settings.py:3063-3077) seesinstalled_base_url== routed URL, noping_header_opt_out, no ping line, and returns"missing".cmd_ensure_ping_headerthen callsadd_ping_headerandsave. The PR body says it on purpose: "An install with no record of either choice counts as heal." The testTestSessionStartDoesNotHealAnInstallMadeWithNoPingHeadercreates the opt-out with the NEWadd, so it does not cover an opt-out made by the released code. - Fix: do not write the header for an install with no record. Show a note at SessionStart instead ("Ping is not enabled for this install; run /context-guru:install to turn it on"). Or add only when a record proves the install predates #667 (for example, an install-scope row older than the #667 release). Add a test with a file written by the v0.5.4
add --no-ping-header.
- What fails: a user installs with
-
context-guru-plugin/scripts/start-proxy.sh:336 — the heal holds body and key with no consent note, and the PR states no data-dependence change
- What fails: the header makes the server keep the user's latest request body and key in memory (docs/data-dependence.md:215).
install.shsays this every time it writes the header, and says how to opt out (install.sh:1243-1247,ping_note). The heal writes the same header but prints only "Ping enabled for this install; it works from your next session". The user is not told what is kept, for how long, or how to turn it off. - Proof: start-proxy.sh:336 is the only output of the heal. CLAUDE.md "Metadata first" requires the PR to say what a feature keeps and to get the "Decided by" person to confirm a change. The PR says "Data dependence: none", but for every old install the change moves keep-alive-off sessions from "nothing held" to "body and key held".
- Fix: put the
ping_notewords (what is kept, how long, how to opt out) in the SessionStart note. State the change at the top of the PR and get the data-dependence owner to confirm. Finding 1's "note, do not write" fix also removes this problem.
- What fails: the header makes the server keep the user's latest request body and key in memory (docs/data-dependence.md:215).
-
context-guru-plugin/scripts/settings.py:3073 — a user who removes the ping line by hand gets it back every session
- What fails: after a heal, the user deletes
x-context-guru-ping: 1fromANTHROPIC_CUSTOM_HEADERSto stop the server keeping their data. The next SessionStart sees no ping line and no opt-out, returnsmissing, and adds the line again. The user cannot turn it off by editing settings, which is the obvious way. - Proof:
ping_header_statedoes not readinstalled_ping_header. After a heal, meta holdsinstalled_ping_header: "x-context-guru-ping: 1". If that record is present and the line is gone, the user removed our line. The function still returns"missing". - Fix: in
ping_header_state, returnopted-out(or a newremovedstate) whenmeta[PING_HEADER_META] == PING_HEADERand no ping line is present. Add a test: heal, delete the line, run SessionStart, and expect no change.
- What fails: after a heal, the user deletes
-
context-guru-plugin/scripts/settings.py:2915 — re-running the install with
--no-ping-headerrecords the opt-out but keeps our header- What fails:
install.shtells the user "To opt out, re-run the install with --no-ping-header" (install.sh:1246). With this PR, that re-run on a file with our recorded line goes to thecompletedbranch.record_ping_choice(meta, False)writesping_header_opt_out: true, butx-context-guru-ping: 1andinstalled_ping_headerstay. The proxy still holds body and key.ping_header_statenow returnsopted-out, so doctor hides the check, and the file says the opposite of what it does. - Proof: settings.py:2898-2900. With
ping_on=Falseand the header present, the newand (ping_on or ... PING_OPT_OUT_META ...)clause is False, so the code falls to line 2905 and later. Nothing in that branch callsremove_ping_header. The bug in the opt-out path existed before, but this PR writes the header for many more users, and this re-run is the only opt-out it gives them. - Fix: in
record_ping_choice, whenping_onis False, callremove_ping_header(env, meta)and popPING_HEADER_META. Passenvin. Add a test: heal, re-runadd --no-ping-header, and expect our line gone and the user's other headers kept.
- What fails:
-
context-guru-plugin/scripts/cg.py:1235 —
/context-guru:pingstill says "restart Claude Code after the plugin update"- What fails: the PR fixes the wrong advice only in the mod toast (hooks/model.ts:123).
cg.py pingprintsCan't ping: restart Claude Code after the plugin update.for the samenot opted inreason. That is the exact message #685 says leaves the user stuck. The Codex copy (codex-marketplace/.../cg.py:1235) has the same text. The comment abovePING_REASONSsays "The mod's toast says the same", which is now false. - Proof:
grep -n "not opted in" context-guru-plugin/scripts/cg.pygives line 1235 with the old text. ping_test.go:224 and :239 still assert the old text, so the tests lock the wrong advice in. - Fix: change
PING_REASONS["not opted in"]in both cg.py copies to the new words, and update ping_test.go:224 and :239.
- What fails: the PR fixes the wrong advice only in the mod toast (hooks/model.ts:123).
Non-blocking
ping_header_statereturnspresentfor a user linex-context-guru-ping: 0. Doctor then shows "ok: Ping header is set" when Ping is off. Check the value, or say "set by you" in the doctor line.- The Codex copy of
cg.pycallssettings.py, butcodex-marketplace/plugins/context-guru/scripts/has nosettings.py._ping_header_statealways returnsunknownthere, so the doctor check never shows. That is harmless, but it is dead code in the Codex plugin. - No test covers the new doctor check (
present→ ok,missing→ warn, other states → no line). cmd_ensure_ping_headerheals every matching file, but it reports only the last state it sees. When two scopes are bothmissing, the note andfile=name only one of them. This is fine for the note, butfile=can mislead a caller.
What I checked
- I read the full diff of 542df90 (8 files) and the commit message.
- I read the code around each change:
with_ping_header,add_ping_header,remove_ping_header, all six exits ofcmd_add,cmd_remove's meta cleanup,save,user_scope_files,_read_install_scopes. - I read the
start-proxy.shflow before step (1a): theFORCEgate, the routed-port gate,note(). I checked that the heal call fails open:|| ph_out_="", stderr is dropped, and the command always exits 0. - I read install.sh's
--no-ping-headerhandling andping_noteconsent text, and #667 (328064e) to find what an older--no-ping-headerinstall wrote. - I read docs/data-dependence.md rows for Ping and keep-alive.
- I read the new tests and the helpers they use (
settingsInDir,sandboxEnv,headersOf), and the changedTestAnAlreadyRoutedProjectStillGetsAHatchfixture. - I read ping_test.go for the
not opted intext. - I did not run tests. Live tests are not approved, and Go is not installed.
Review round 1 on #691. - Heal only an install that provably predates --no-ping-header: its install-scope row is older than 2026-10-22 13:58:53 UTC. Print the consent words when it writes. - Any other install with no record gets one note and no write. - A line the user removed by hand (installed_ping_header present, line absent) is not added again. - `add --no-ping-header` removes our recorded line in every write branch and records the opt-out. - A user ping line that is not 1 is not "present". - start-proxy.sh uses a grep before it starts python3. - cg.py ping and its Codex copy use the new "not opted in" words. - docs/data-dependence.md names the heal. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
|
Round 1 is fixed in e645bf1. One reply per finding. Reviewer 2
Reviewer 1
|
OsherElhadad
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (claude, user of @OsherElhadad) | Claude Code 2.1.310 | offload-review skill, @OsherElhadad's session | resumed | 2 of 2 | 2 of 2 | e645bf159242 |
blocking |
Verdict: blocking
Earlier findings
- R2 #1 (heal reverses a v0.5.4 opt-out): fixed, with one gap. The heal now needs an install-scope row older than 2026-10-22 13:58:53 UTC (= 16:58:53 +0300 of 328064e, correct). It prints the full consent words. The PR body states the data-dependence change at the top. docs/data-dependence.md row "Keep-alive pings" is updated. The gap is new finding 1 below.
- R2 #2 (opt-out does not remove a healed line): fixed.
record_ping_choicenow callsremove_ping_headerand popsinstalled_ping_headerin all three write branches. It removes only the line we recorded, so a user's own ping line stays. Theunchangedclause now needsping_header_opt_outand noinstalled_ping_header, so a re-run after an opt-out is a no-op. TestsTestOptingOutAfterAHealRemovesOurLineOnlyandTestOptingOutRemovesOurLineWhenTheInstallMovescover thecompletedandrepointedbranches. - R1 #1, #2: fixed (same change as R2 #1).
TestSessionStartKeepsAV054OptOutOffuses the v0.5.4 file shape. - R1 #3 (a line the user removed comes back): fixed. New state
removed. It is never healed. The start-proxy.sh grep also skips a file withinstalled_ping_header. - R1 #4: fixed (same as R2 #2).
- R1 #5 (
cg.py pingtext): fixed in both cg.py copies. ping_test.go:224 and :239 now assert the new words. - Non-blocking items: I accept the author's replies. The per-key merge note stays open for a follow-up, and that is fine.
Findings
- context-guru-plugin/scripts/settings.py:3079-3091 —
predates_ping_flaguses the FIRST row that names the file, not the newest. An old legacy row can still turn on Ping for a v0.5.4 opt-out.- What fails: install-scope.json can hold two rows for the same machine-wide file. The code says so:
_machine_wide_record(settings.py:1667-1669) says "a file holding two such rows is a legacy row plus its migrated self". A user-scoperecord_install_scope"migrates nothing and drops nothing" (settings.py:1163-1168). So it writes a new row underuser_scope_key()and leaves the legacy row under the project key. Example:- Before
user_scope_key()(f45697d, 2026-09-25), the user runs a machine-wide install from project P. The row goes under P,scope=user,file=~/.claude/settings.json,recorded_atin September. - On v0.5.4 the user re-runs it with
--no-ping-header. The v0.5.4addwrites no opt-out key.record_install_scopewrites a new row underuser_scope_key(), stamped after the cutoff. The P row stays, with its old stamp, and it comes first in the file. - At SessionStart,
predates_ping_flagloops_read_install_scopes().values()in file order. It finds the P row first and returnswhen < cutoff→ True. The heal writes the header, and the user's opt-out is reversed.
- Before
- Proof: settings.py:3083-3089 has
return when < cutoffinside the loop, on the first match. Nothing compares it to later rows.cmd_portcopies a legacy row touser_keywithdict(mw_rec)(settings.py:2245-2249), so it keeps the OLDrecorded_at. That is a second way to have an old stamp on a file that was installed again later. The tests write only one row (recordInstall), so they do not cover this. - Fix: look at every row whose
filematches. Heal only when the NEWESTrecorded_atis before the cutoff (or: all matching rows are tz-aware and before the cutoff). Add a test with two rows for the same file: one before the cutoff, one after. Expect no write and the one-time note.
- What fails: install-scope.json can hold two rows for the same machine-wide file. The code says so:
Non-blocking
- The data-dependence change still needs the confirmation from the "Decided by" person of the "Keep-alive pings" row before merge (CLAUDE.md). I see no such comment on the PR yet.
- start-proxy.sh:336-345: the grep gate checks only the three fixed files. An install in a custom file (found by
cmd_ensure_ping_headerthrough the install-scope rows) does not start python3 unless one of the three files also passes the gate. That is the safe direction: no heal, no note. PING_FLAG_SHIPPEDis the author date of the squash commit. Anyone who installed from the #667 feature branch before that time looks "older". This is very rare, so I do not block on it.
What I checked
- Last review: round 1, 542df90, 2026-10-25T10:04:31Z
- New commits read: 1 (e645bf1 fix(plugin): ask before turning Ping on; opt-out removes the header)
- Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files)
- New items since my last review: reviewer 1's round-1 review (10:05:55Z); I read all 5 findings and 4 non-blocking points, and I checked each fix above. The author's reply comment (10:16:30Z); I checked each reply against the code. The new commit e645bf1; I read the full diff of 7 files.
- The full diff 542df90..e645bf1: settings.py, start-proxy.sh, both cg.py copies, ping_test.go, ping_selfheal_test.go, docs/data-dependence.md. I also read the PR body (new "Data dependence change" section).
- Around the changes:
record_install_scope(all of it),resolve_install_scopemigration,_is_machine_wide_row,_machine_wide_record, thecmd_portwrite,remove_ping_header, allcmd_addbranches with the newrecord_ping_choice(env, meta, ping_on). ping_header_statestates and therankorder incmd_ensure_ping_header. The one-time note file (ping-header-note.json, mode 0600, fail-open). The consent text matches install.shping_note.- start-proxy.sh (1a): the grep gate, the
note=parse, and fail-open (|| ph_out_="", stderr dropped, exit 0). - The 9 new and 7 changed Go tests. I did not run them: live tests are not approved, and Go is not installed.
OsherElhadad
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (claude, user of @OsherElhadad) | Claude Code 2.1.310 | offload-review skill, @OsherElhadad's session | resumed | 1 of 2 | 2 of 2 | e645bf159242 |
blocking |
Verdict: blocking
Status of round-1 findings
- R1 #1 (heal overrides a v0.5.4 opt-out): fixed for project installs. For a machine-wide install, a gap is left open. See new finding 1.
- R1 #2 (no consent words, wrong data-dependence statement): fixed.
PING_CONSENThas theping_notewords. The PR body states the change at the top. docs/data-dependence.md:215 names the heal. The "Decided by" person still has to confirm. That is a process step for the author, not a code defect. - R1 #3 (a removed line comes back): fixed. The
removedstate is never healed. The start-proxy.sh grep also skips a file that hasinstalled_ping_header. - R1 #4 (a
--no-ping-headerre-run keeps our line): fixed.record_ping_choicecallsremove_ping_headerin all three write branches, and theunchangedgate now needsPING_HEADER_METAto be absent. - R1 #5 (old words in cg.py): fixed in both copies, and ping_test.go is updated.
- R2 #1: fixed, the same as R1 #1 and #2, with the same gap as new finding 1.
- R2 #2: fixed, the same as R1 #4.
- Non-blocking, my round 1:
user-offis fixed. The doctor tests are added. I accept the Codex "shows nothing" reply. I accept the "strongest state wins" reply. - Non-blocking, R2's round 1: I accept the per-key env merge reply, because doctor reads files, not the live session.
Findings
- context-guru-plugin/scripts/settings.py:3082-3088 —
predates_ping_flagtrusts the first row that names the file, not the newest. A machine-wide v0.5.4 opt-out can still be healed.- What fails: a user made a machine-wide install before 2026-09-25 (f45697d,
user_scope_key). That install filed its row under a project key, withscope=user,file=~/.claude/settings.json, and an oldrecorded_at. On v0.5.4 the user re-ran the machine-wide install with--no-ping-header.record_install_scopethen wrote a new row underuser_scope_key()with a stamp after the cutoff. The user-scope branch "migrates nothing and drops nothing" (settings.py:1163-1168), so the legacy row stays.port allocalso only copies a legacy row touser_key; it does not delete the old row (settings.py:2245-2250). The install-scope file now has two rows for one file: the legacy row first, because a new key is added at the end of the dict, and the new row second.predates_ping_flagreturns on the first match, the old stamp, so the result isTrue. The next SessionStart writes the header, and the server holds the body and key for a user who opted out. - Proof: settings.py:3082-3088 loops
_read_install_scopes().values()and doesreturn when < cutoffon the first row whosefilematches._machine_wide_record's docstring (settings.py:1660-1670) says that this two-row shape ("a legacy row plus its migrated self") is a real, expected state. No test covers two rows for one file.recordInstallwrites exactly one row. - Fix: use the newest
recorded_atacross all rows that match the file (max(...)), and heal only when that newest stamp is before the cutoff. A row without a parseable stamp should mean "do not heal". Add a test with two rows for one file: an old legacy row first and a new row second. Expect no write.
- What fails: a user made a machine-wide install before 2026-09-25 (f45697d,
Non-blocking
- start-proxy.sh:335-344: for an install that cannot be proved older, the file never gets a ping record. So the grep gate passes on every SessionStart, and python3 starts every session, only to find that the note was already seen. You could write a small marker into
$context-guru(for exampleping_header_note_shown), or add the seen file to the grep gate. - start-proxy.sh:335-337 greps only the three standard files.
cmd_ensure_ping_headeralso reads thefileof the install-scope rows (a custom--fileinstall). For such an install, the shell gate never starts python3, so it is never healed or noted. This is safe, because it writes nothing, but the docs say "at its next session start". TestDoctorShowsThePingHeaderLine: runCGCode setsCLAUDE_PROJECT_DIRto a temp dir, then appendsCLAUDE_PROJECT_DIR=e.proj. The later value wins under Go's exec, so the test is correct. The test does not pinCLAUDE_CONFIG_DIRfor the user file, but runCGCode already gives it a temp dir. OK.
What I checked
- Last review: round 1, 542df90, 2026-10-25T10:05:55Z
- New commits read: 1 (e645bf1 fix(plugin): ask before turning Ping on; opt-out removes the header)
- Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files)
- New items since my last review: the author's comment at 2026-10-25T10:16:30Z, with one reply per finding from both reviewers. I checked each reply against the code (see "Status of round-1 findings"). There are no new comments from other people.
- I read the full diff 542df90..e645bf1 (7 files): settings.py, start-proxy.sh, both cg.py copies, ping_selfheal_test.go, ping_test.go, docs/data-dependence.md.
- I read the code around each change: all write branches of
cmd_addwith the newrecord_ping_choice,remove_ping_header,ping_header_state,cmd_ensure_ping_header(the file list, the rank, the note),predates_ping_flag,ping_note_seenandmark_ping_note_seen. - I checked that every
cmd_addexit (unchanged, completed, repointed, added) callsrecord_install_scope, so it updatesrecorded_at. That is true at HEAD and in v0.5.4. So for a project install, the stamp proof holds. - I read
record_install_scope(settings.py:1114-1237),_is_machine_wide_row,_machine_wide_record, and theport alloclegacy-row move, to see when two rows can name one file. - I checked the cutoff: 2026-10-22 16:58:53 +0300 is 13:58:53 UTC, which matches 328064e.
- I checked that the start-proxy.sh block fails open:
|| ph_out_="", stderr is dropped, and an empty note prints nothing. - I read the new tests and the helpers
runCGCodeandsandboxEnv. - I read the updated PR body (the data-dependence section at the top).
- I did not run tests. Live tests are not approved, and Go is not installed.
Review round 2 on #691. - predates_ping_flag looks at every row that names the file. It allows the heal only when all of them have a tz-aware recorded_at before the release of --no-ping-header. One newer or unreadable row means no write and one note. - start-proxy.sh skips python3 once the note was shown for the file. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
|
Round 2 is fixed in the new commit. Reviewer 2, finding 1, and Reviewer 1, finding 1 (same bug): fixed.
Non-blocking
|
Main added #691 and #692. The only conflict was docs/data-dependence.md: #691 added three sentences to the end of the "Keep-alive pings" row, and this branch edits the "Body stash" row next to it. Main's keep-alive row is kept as it is, and so is this branch's Body stash row. Also, in the same commit, two small round-2 fixes: - Delete spendHeld, which has no caller since the claim replaced it. - Say that sweep_not_registered is counted at the request, not at a ping. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
…0.2.5) Both plugins changed in this release, so installed plugins must update. - Claude Code plugin: 0.6.0 was set in #694. No change here. - Codex plugin: 0.2.4 to 0.2.5. The vendored cg.py and costly.py and one skill changed in #512, #681, #683, #691, #694 and #698. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
…0.2.5) (#701) chore(plugin): bump the plugins for v0.6.0 (Claude Code 0.6.0, Codex 0.2.5) Both plugins changed in this release, so installed plugins must update. - Claude Code plugin: 0.6.0 was set in #694. No change here. - Codex plugin: 0.2.4 to 0.2.5. The vendored cg.py and costly.py and one skill changed in #512, #681, #683, #691, #694 and #698. Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
Closes #685
Data dependence change (needs confirmation)
x-context-guru-ping: 1makes the server hold the latest request body and key for the Ping button. It holds them 5 minutes after the last request on a 5-minute cache, and up to 59 minutes on a 1-hour cache. This is the row "Keep-alive pings" indocs/data-dependence.md.--no-ping-header(v0.5.4). They get the header at their next session start.Summary
--no-ping-headergets the Ping header at the next SessionStart, with the consent words./context-guru:doctorchecks the header.What we found
x-context-guru-ping: 1on the request.install.shwrote that header.What changed
start-proxy.shcallssettings.py ensure-ping-headerat SessionStart.installed_base_url) and an install-scope row older than 2026-10-22 13:58:53 UTC (when--no-ping-headershipped).add --no-ping-headerrecordsping_header_opt_out: trueand removes our recorded line. SessionStart does not heal that install.not opted innow reads: "Ping isn't enabled for this install yet; it turns on in your next session (or run /context-guru:install)".cg.pyis updated to match.How it was tested
ping_selfheal_test.go(old install healed with consent words, unprovable install gets a note and no write, a v0.5.4 opt-out stays off, a hand-removed line stays removed,--no-ping-headerremoves our line in every branch, doctor check, and the cases below):start-proxy.sh--no-ping-headerinstall is not healed--checkwrites nothingclaude plugin test .: 33 pass, 0 fail.go test ./context-guru-plugin/...: 4 tests fail,TestCGGoldens,TestSaveMoreWidthASCIIAndColour,TestCostlySettingsGoldensandTestSaveMoreDefaultIncludesTheSettingsCard. They fail the same way on a cleanorigin/main. Everything else passes.settings.json.Before:
After one SessionStart:
A second run printed no note and changed nothing.
Technical notes
pingable === false" item in Ping says "restart Claude Code" but a restart never adds the x-context-guru-ping header #685 is not here. It is in the band layout, which the redesign owns.TestAnAlreadyRoutedProjectStillGetsAHatchnow seedsping_header_opt_outin its fixture. A no-op re-run must stay a no-op, and a file with no ping record now gets one.🤖 Generated with Claude Code