Skip to content

fix(redaction): skip gh run view job/step prefixes - #1053

Draft
cursor[bot] wants to merge 7 commits into
mainfrom
cursor/bc-3a49ae8c-81cf-48e7-8f97-bad23f64ce70-0cce
Draft

fix(redaction): skip gh run view job/step prefixes#1053
cursor[bot] wants to merge 7 commits into
mainfrom
cursor/bc-3a49ae8c-81cf-48e7-8f97-bad23f64ce70-0cce

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Next action

Merge this successor instead of #1040. That head still fail-closes a pretty-printed password dump when collect_failed_check_evidence.sh feeds gh run view --log-failed lines (job<HTAB>step<HTAB> plus the zip RFC 3339 timestamp).

What changed

  • Skip the GitHub CLI collector prefix job<HTAB>step<HTAB> only when an RFC 3339 timestamp follows the second tab, then skip Z or time-numoffset plus SPACE or HTAB the same way JSON whitespace is skipped.
  • Keep UNKNOWN STEP and offset/HTAB zip lines as one span so group and status text stay visible.
  • Run unstructured redaction on skipped prefix bytes that remain inside a rewritten JSON span so a credential-shaped job name or run: step text cannot survive on continuation lines.
  • Leave a two-tab TSV without an RFC 3339 timestamp untouched as ordinary field text.
  • Cite GitHub CLI gh run view next to the existing APA 7 RFC 3339 / RFC 8259 / workflow-log references.

Verification

Focused redaction selection: 177 passed. Owned modules redact_sensitive_log.py, sandboxed_verify.py, and sandboxed_web_e2e.py report 100% statement and branch coverage (1,136 statements, 464 branches). Complete repository suite: 1232 passed plus 16 subtests before the two added collector fixtures; focused selection includes those fixtures.

Acceptance

Do not merge #929, #1031, #1038, or #1040. After this head is green, treat [REDACTED] as evidence suppression and rerun the exact-head sandbox redaction quality job before closing #908.

Open in Web View Automation 

@cursor
cursor Bot requested a review from seonghobae August 16, 2026 16:22

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next action

Mark this pull request ready for review, then merge it instead of #1040, #1038, #1031, or #929.

This head skips the gh run view --log-failed job<HTAB>step<HTAB> collector prefix plus RFC 3339 Z / time-numoffset and SPACE or HTAB, so a pretty-printed password dump in the actual failed-check excerpt keeps ##[group] and status text. Skipped job/step fields that remain inside a rewritten span still pass unstructured redaction. A two-tab TSV without a timestamp is not eaten as a runner prefix.

Local focused selection: 177 passed; 100% statement/branch on the three owned modules (1,136 statements, 464 branches).

Do not self-approve. After it is green, treat [REDACTED] as evidence suppression and rerun the exact-head sandbox redaction quality job before closing #908.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

@seonghobae
seonghobae force-pushed the cursor/bc-3a49ae8c-81cf-48e7-8f97-bad23f64ce70-0cce branch from 5b66ccd to 4011099 Compare August 20, 2026 01:37
@seonghobae

Copy link
Copy Markdown
Contributor

Rebased the five-commit redaction series onto current origin/main c47bee5, preserving the RFC 3339 runner metadata and gh run view job/step-prefix handling.

Current HEAD: 4011099

Validation on this HEAD:

  • focused redaction/security pytest: 177 passed
  • interrogate: 100%
  • actionlint, compileall, and git diff --check passed

@OpenCode review this exact HEAD after the rebase.

seonghobae and others added 5 commits August 20, 2026 14:48
Replay unique #929 source onto current origin/main. Skip shared
ARCHITECTURE/CLAUDE/AGENTS trees and stale materialize files.
Treat only plausible JSON openers as span starts and score a failed parse
against the window until the next opener. A ##[group] marker or prose
[timeout] no longer fail-closes a later pretty-printed password object.
Cite RFC 8259, ECMA-404, and ISO/IEC 21778 for duplicate-member layout.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Skip RFC 3339 runner timestamps inside raw JSON spans and open '[' only
for a real JSON value so a downloaded pretty-printed password dump keeps

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Z-only prefixes still fail-closed a pretty-printed password dump when
the collector emitted time-numoffset or a tab after the timestamp.
Skip those RFC 3339 §5.6 forms the same way Z plus SPACE is skipped.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Keep failed-check excerpts visible when collect_failed_check_evidence.sh
feeds gh run view --log-failed lines (job HTAB step HTAB plus the zip
RFC 3339 timestamp, including UNKNOWN STEP). Redact credential-shaped
job/step fields that remain inside a rewritten JSON span.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@seonghobae
seonghobae force-pushed the cursor/bc-3a49ae8c-81cf-48e7-8f97-bad23f64ce70-0cce branch from 4011099 to cd4b30e Compare August 20, 2026 05:49
@seonghobae

Copy link
Copy Markdown
Contributor

@opencode-agent

Rebased PR #1053 onto current protected main and revalidated the sandbox log-redaction boundary.
Exact current head: cd4b30e

The collector skips only the verified GitHub CLI job/step prefix plus RFC 3339 metadata; ordinary two-tab text, UNKNOWN STEP, offset timestamps, continuation spans, and credential-shaped names remain visible to redaction.

Proof at this exact head: 177 focused security/redaction tests passed; redaction, sandbox verification, and sandbox E2E production modules have 100% interrogate coverage; compileall, quality-workflow actionlint, and git diff --check passed.

The PR remains Draft. Please rerun independent review and protected Checks before readiness or merge; no bypass or merge is claimed.

Copy link
Copy Markdown
Contributor

Current-head merge repair pushed normally at 8d948aba after reconciling the stale main base; the sandbox redaction contract and exact-artifact SBOM documentation are preserved. Please observe Checks for this exact head; no merge bypass is used.

@seonghobae

Copy link
Copy Markdown
Contributor

Exact-head lock repair pushed as 15fa991 from 8d948ab. Updated the hashed pip audit runtime from pip 26.1.2 to pip 26.2.1 with exact hashes, without changing the hourly caller implementation. The same lock has already passed local pip-audit in this maintenance loop; hosted checks and exact-head approval must be re-evaluated. No bypass or force push was used.

@seonghobae

Copy link
Copy Markdown
Contributor

Dependency Review support returned HTTP 502 from the GitHub dependency-graph compare endpoint before a dependency result was produced. This is provider infrastructure evidence, not a source finding. I am rerunning the failed hosted job and will keep the required gate fail-closed.

@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: draft Draft pull request type: bug Defect or incorrect behavior labels Aug 22, 2026

Copy link
Copy Markdown
Contributor

Triage (2026-09-02): base history is orphaned, not a resolvable merge conflict

This PR's base commit 55a8b576725451dfe0a21a57d36a2f1a41619b24 is not an ancestor of current main:

$ git merge-base --is-ancestor 55a8b576725451dfe0a21a57d36a2f1a41619b24 origin/main && echo yes || echo no
no
$ git merge origin/main --no-edit
fatal: refusing to merge unrelated histories

origin/main now has multiple historical roots (a restructuring/history-splice happened after this branch was cut from an older main), so there is no common ancestor for an ordinary 3-way merge. Forcing --allow-unrelated-histories would diff every shared file against an empty tree and manufacture spurious conflicts across the whole tree — not a real fix, and not something to push through mechanically.

The mergeable_state: dirty GitHub reports here reflects that structural gap, not a normal content conflict this session's usual merge-main-and-resolve recipe can repair.

Next action (needs a human/design call): either (a) reimplement the intent of this PR as a fresh branch cut from current main — the historical commits can't be replayed as-is — or (b) verify whether the underlying gap (gh run view redaction prefixes) is already closed on current main, since predecessor #1040 was itself closed unmerged around the same time this history diverged, and close this as superseded if so. Not closing this myself since I haven't verified a live successor covers it. Leaving open pending that decision.


Generated by Claude Code

Copy link
Copy Markdown
Contributor

Retraction — the "main history splice" diagnosis was wrong.

An earlier comment on this PR claimed main's history was spliced onto new roots around 2026-08-20/21, that this PR's base predates the boundary, and that an ordinary merge would fail with fatal: refusing to merge unrelated histories requiring a from-scratch re-implementation. That diagnosis is incorrect — please disregard it entirely.

Root cause: the analysis was run from a shallow git clone in the analysis sandbox (git rev-parse --is-shallow-repository → true). A shallow clone's truncation boundary commits look exactly like disjoint history roots, and git merge from inside a shallow checkout genuinely does throw fatal: refusing to merge unrelated histories even when the real, full history is perfectly linear and connected. After git fetch --unshallow, origin/main has exactly one root commit, and this PR's base is a completely normal ancestor of current main.

This PR should be triaged the ordinary way: fetch a full (non-shallow) clone, git fetch origin main && git merge origin/main --no-edit, resolve any real content conflicts, run the repo's gates, and push. There is no history-splice blocker and no need to abandon or re-implement this PR's work.

Apologies for the incorrect guidance. See #1722 for the corrected writeup.


Generated by Claude Code

seonghobae pushed a commit that referenced this pull request Sep 6, 2026
…s upstream fix

Residual (iii) of the retry-stacking follow-up recorded that the 90 s seen on
every stalled review request is "the transport's recv default, not a deadline
this repository set", and left open whether a preflight probe deadline is a
policy value distinct from the inference deadline.

Half of that is no longer open. The default is
`ModelClient.__init__(timeout: int = 90)` at
`contextual_orchestrator/orchestrator.py:1696`, read at
`contextual-orchestrator@414f2297` — the SHA the central sidecar is pinned to —
and `contextual-orchestrator#1053` changes exactly that signature to
`timeout: float | None = None`, propagating the `None` through
`_local_provider_slot`'s deadline arithmetic and, per its diff stat, through
`endpoint_race.py`, `cost_router.py`, `batch_routing.py`, `server.py`, and the
synchronous embedding path.

So the inference-path half has a claimed upstream fix and only the
preflight-probe deadline stays open in this repository. The entry also records
that `#1053` and `#1082` do not subsume each other — `#1053` removes the 90 s
attempt, `#1082` records and classifies a transport failure when one still
arrives — and that the sidecar pin must advance past whichever lands last.
Both are other lanes' active work; this is a dependency note, not a claim.

Also merges `origin/main` (`dd0b96fe`) into the branch, which was `behind`.

Verification: full suite 2956 passed, 1 skipped, 21 subtests passed;
`git diff --check` clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPmJErfkcHer4UVEgrQxUX
seonghobae pushed a commit that referenced this pull request Sep 6, 2026
… not describe

`noema-review` failed on this PR's own head at 15:37Z (`9c010fcb`, run
34035522521, job 101501520756):

    Noema gateway transport failed: HTTPError: HTTP Error 502: Bad Gateway;
    caller attempts=1, duration=1424.1s, phase=response_error,
    served_model=deepseek-ai/deepseek-v4-flash-0731

None of residuals (i)-(iii) accounts for it:

- Not capacity (i): a route was ready and `deepseek-v4-flash-0731` served, so
  preflight succeeded rather than exhausting at zero ready.
- Not the raw-500 class (ii): the caller received the classified 502 that
  `contextual-orchestrator#1082` is adding, not an opaque `internal_error`.
- Not the 90 s recv default (iii): one caller attempt ran 1424.1 s, about 23.7
  minutes, roughly sixteen times that limit, and `phase=response_error` says a
  response arrived carrying an error status rather than a socket expiring — a
  different event from the `TimeoutError` in `#1053`'s own 90.054 s noema
  measurement.

The reading this supports is that `caller attempts=1` bounds the caller only;
the gateway owns repair and failover (its own warning line says so) and spent
those 23.7 minutes walking the pool internally before classifying.

Honest limit stated in the entry: this is the job log, not the
`noema-sidecar-evidence` artifact (9992218398) that would give the internal
attempt count and the distribution of the 23.7 minutes. No per-attempt
breakdown is claimed. What the log establishes alone is that a served route
plus a classified 502 plus a 23.7-minute wall clock is a real, current
combination, so closing (i) and (ii) will not by itself account for it.

Verification: full suite 2956 passed, 1 skipped, 21 subtests passed;
`git diff --check` clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPmJErfkcHer4UVEgrQxUX
seonghobae pushed a commit that referenced this pull request Sep 6, 2026
… the evidence artifacts

I downloaded the `noema-sidecar-evidence` artifacts (9992218398, 9992230612)
that the previous two commits explicitly declined to read, and they refute two
of the three claims the entry rested on. Both retractions are recorded in the
entry rather than edited away.

Retraction 1 — nothing was served. `served_model` names the last route
*attempted*, not one that answered. Both artifacts end with
`provider_attempt_failed agent_id=nvidia_nim_deepseek_ai_deepseek_v4_flash_0731
… error_type=TimeoutError`, then `circuit_failure … failures=1.0 threshold=3`,
then `request_failed status=502 code=provider_connection_error`. I read a field
name as an outcome.

Retraction 2 — the 90 s default IS operative here, so this is not evidence
against `contextual-orchestrator#1053`. `caller attempts=1` bounds the caller;
the gateway ran 24 matched internal attempts summing to ~11,500 s against a
1,424 s wall clock (8–9× concurrency, so they race), and four of the 24 sit at
89.5–92 s in both runs. I told the `#1053` lane their 90.054 s sample was
contradicted; it is not, and that is corrected on `#1053` directly.

What survives is the part worth acting on: the durations are bimodal. Besides
those four ~90 s attempts and six failing under 10 s, 11 of 24 attempts on
`#1884` and 12 of 24 on `#1187` ran past 600 s, to 1,333.7 s and 1,122.9 s,
medians 478.3 s and 631.3 s. No 90 s bound explains that second population, and
the consequence runs opposite to what I implied earlier: removing the implicit
timeout converts the ~90 s population into unbounded waits and leaves the long
one untouched, so on this evidence it should make these runs longer. Stated as
a two-sample prediction, not a proven regression.

Two readings that support the other lanes rather than contradict them: the
breaker is told on this path (`circuit_failure` 13 and 11, `circuit_opened`
twice each), matching `#1082`'s scoping of its defect to the passthrough walk;
and its re-selection concentration is visible here, with
`deepseek-v4-flash-0731` taking 23 of ~40 attempts across both NVIDIA keys
despite the breaker opening twice. Preflight read `ready_count 6, rejected 8,
deferred 2, skipped 4` in both runs, so capacity is ruled out by artifact
rather than by inference.

Verification: full suite passed; `git diff --check` clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPmJErfkcHer4UVEgrQxUX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work status: draft Draft pull request type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants