knowledge: caplog getMessage() assertions; probe-path vs operation-path auth divergence (2 verified, 1 folded into #80) - #101
Open
choiyounggi wants to merge 1 commit into
Conversation
…probe-path vs operation-path auth divergence)
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.
Knowledge flush — 3 insight(s): 2 ingested, 1 folded into open PR #80
Verified best-practice
1. pytest caplog log-message assertions must use
record.getMessage()/caplog.messages, neverrecord.message % record.args— INGESTED, confidence: verified.record.messageis alreadymsg % args; re-applying% record.argsraisesTypeError: not all arguments converted during string formattingon any parameterized log call, while argument-less calls make the faulty pattern a silent no-op (which is how it survives in suites).message"computed as msg % args … set when Formatter.format() is invoked";getMessage()"merging any user-supplied arguments with the message".LogCaptureHandler.emitappends the record and callsStreamHandler.emit(which formats, settingrecord.message); verified against current source.record.messagefully interpolated,message % args→ the exact TypeError; argument-less record → silently passes. Matches the harvesting session's pytest run (uv run --extra dev pytest tests/test_gh.py -q, fail→pass flip after switching togetMessage()).2. A passing page-load login probe does not validate direct API auth under refresh-token cookie auth — INGESTED, confidence: verified.
currentUser) with the operation's own client/cookie jar, and refresh + persist cookies on failure.setTokenCookiesetsaccess_tokenmaxAge 1h besiderefresh_tokenmaxAge 30d;consumeUserrefreshes on expired/near-expiry access tokens and returns rotated cookies via Set-Cookie.check-login.mjs→STATUS:LOGGED_INimmediately followed by publish failure "Not logged in"; directv3.velog.io/graphqlcurrentUserwith the same stored cookies → null; re-running the login flow (rewriting the cookie store) made the same publish succeed. Page generalizes the directive; velog specifics kept as the worked example and edge cases.3. tmux prompt injection: "delivered" return with the prompt stuck as
[Pasted text #N]— send Enter separately and re-verify — NOT re-ingested (fold, see Open-PR check). The insight is real and was independently reproduced this time (pdfsum1 run, 3 sessions), but an open PR already carries it in equal-or-better form.Existing-layer check
Pages read: infrastructure-agent-orchestration-pane-delivery-confirmation, testing-quality-tests-that-cannot-fail, debugging-methodology-hypothesis-testing, infrastructure-agent-orchestration-control-signals-vs-primary-artifacts
INDEX.md, then readwiki/infrastructure/index.md,wiki/testing/index.md,wiki/debugging/index.mdin full; grepped all ofwiki/forcaplog|getMessage|LogRecord,refresh token|access token|cookie,pasted|send-keys|Enter.testing/quality/captured-log-message-assertions.md. Related-link added both ways withtests-that-cannot-fail(the zero-arg latent-pass is exactly its "green history proves nothing" mechanism).hypothesis-testing/reproduce-first/verify-the-fixown adjacent but distinct triggers. New trigger → new pagedebugging/methodology/probe-path-vs-operation-path.md. Related-links added both ways withhypothesis-testingandcontrol-signals-vs-primary-artifacts(shared theme: a signal is evidence only about the path that produced it). No conflicts with existing directives found.pane-delivery-confirmationalready owns the trigger (its multi-line-prompt edge row mandates separate body/submit sends); the specific[Pasted text #N]placeholder + separate-Enter recovery is carried by open PR knowledge: plugin MCP server registration + retiring a replaced auth gate (2 ingested, 1 merged into pane-delivery-confirmation, 1 corrected) #80's diff to that same page. Nothing to merge into the merged layer that knowledge: plugin MCP server registration + retiring a replaced auth gate (2 ingested, 1 merged into pane-delivery-confirmation, 1 corrected) #80 doesn't already add.index.mdfiles gained accurate "load when" rows;log.mdgained two ingest entries.Open-PR check
Listed 27 open
knowledge/*heads (#47–#95) viagh pr list --search "head:knowledge/", fetched allorigin/knowledge/*refs, and grepped eachgit diff origin/main...<head> -- wiki/for overlap keywords (pasted|send-keys|bracketed paste|caplog|getMessage|record.args|refresh token|access token|currentUser|login check|graphql).send-keys/rate-limit-token matches elsewhere).dch0202-20260805-*heads are GitHub OAuth rate-limit content, unrelated to probe-path divergence; no overlap.knowledge/choiyounggi-20260812-234147). Its diff adds topane-delivery-confirmationthe exact edge row — pane shows❯ [Pasted text #3]with no busy marker → "sendEnteras its ownsend-keyscall and re-read" — plus a 2026-08-12 field observation of the same rc=0/"delivered"-but-unsubmitted failure. My candidate's only unique contribution is a second independent reproduction (pdfsum1 run: 3 of 4 sessions stuck post-"delivered", one Enter each resolved), which I posted as a corroborating comment on knowledge: plugin MCP server registration + retiring a replaced auth gate (2 ingested, 1 merged into pane-delivery-confirmation, 1 corrected) #80 rather than opening a sibling duplicate. Candidate retired as folded.Routing decision
getMessage()assertionstesting/quality/captured-log-message-assertions.md(idtesting-quality-captured-log-message-assertions)qualitycategory fits (assertion-correctness cluster); no new category neededdebugging/methodology/probe-path-vs-operation-path.md(iddebugging-methodology-probe-path-vs-operation-path)methodologyfits (diagnosing contradictory evidence); consideredsignalsbut the page prescribes an investigation/verification method, not signal reading; no new category neededinfrastructure/agent-orchestration/pane-delivery-confirmation.md)