[self-care:server-go-logging] Extract ADX visibility digest comparison with diagnostic logging

Aperta Adatta ai principianti
#21,725 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Inizia da server/internal/adxingest/client.go, in particolare da Client.Verify e dalla funzione proposta checkVisibleDigests. Esamina i test unitari diretti per ogni modalità di errore di visibilità elencata, quindi esegui go -C server test ./.... La modifica è completata quando Verify rimane identico nel comportamento, i log diagnostici espongono solo codici di motivo fissi e conteggi e l’intera suite di test superata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agentic-workflows self-care self-care:server-go-logging

Extracts the ADX projection visibility comparison from Client.Verify into checkVisibleDigests in server/internal/adxingest/client.go. Behavior is unchanged, and the comparison now has debug logging and direct unit tests.

Action: Reviewer should confirm Verify is behavior-identical and that the new tests cover each visibility-failure mode; acceptance is a green go -C server test ./....

Summary
  • Subsystem: server/internal/adxingest (next after internal/admission/service.go in the stable path rotation; earlier files had recently been refactored).
  • Refactor boundary: the post-query step of Verify (decode Table/RowDigest rows, sort, compare against expected table:digest entries) is now a pure function. The one intentional internal difference is that sorting no longer reorders the caller's expected slice; it was local to Verify, so there is no observable change.
  • Diagnostics: three cao:adx:client debug logs, reusing the existing package logger, one per failure reason (unexpected_shape, non_string_cell, digest_mismatch). Each logs only fixed reason codes and integer counts. Nothing logged is secret, user-authored, or a raw row, digest, table name, or URL. Logging is off by default and has no effect on control flow.
Tests added

TestCheckVisibleDigests runs real values through the production function. Cases:

  • exact match, order independence, unsorted expected
  • nothing expected or visible
  • missing, unexpected, wrong-digest and wrong-table rows
  • short and extra-column rows
  • non-string table and digest cells

TestCheckVisibleDigestsDoesNotReorderExpected verifies the caller's slice is untouched. No mocks, fakes, or stubs.

Validation
  • gofmt -l server/internal/adxingest: clean
  • go -C server vet ./...: clean
  • go -C server test ./...: all packages pass
  • Diff scanned for secrets: none
Control Plane

[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Original error: ERR_VALIDATION: pushSignedCommits: refusing unsigned push for branch 'self-care/server-go-logging-adx-visibility-14b1bd465a4945b9': GitHub did not verify the initial commit signature; refusing to publish branch 'self-care/server-go-logging-adx-visibility-14b1bd465a4945b9'

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

Create the pull request manually
# Download the artifact from the workflow run
gh run download '46140098759' -n agent -D '/tmp/agent-46140098759'

# Resolve the bundle source ref, fetch it into a temporary ref, then create the local branch
bundle_path='/tmp/agent-46140098759/aw-githubnext-gh-cao-self-care-server-go-logging-adx-visibility.bundle'
temp_ref='refs/bundles/create-pr-self-care-server-go-logging-adx-visibility-14b1bd465a4945b9-0d9f8b97'
target_ref='refs/heads/self-care/server-go-logging-adx-visibility-14b1bd465a4945b9'
bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 ~ /^refs\/heads\// { print $2 }')
if [ -z "$bundle_source_ref" ]; then
  bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 == "HEAD" { print $2 }')
fi
if [ "$(printf '%s\n' "$bundle_source_ref" | sed '/^$/d' | wc -l | tr -d ' ')" != "1" ]; then
  echo "Expected exactly one bundle source ref, found: $bundle_source_ref" >&2
  exit 1
fi
git fetch "$bundle_path" "${bundle_source_ref}:${temp_ref}"
git update-ref "$target_ref" "$temp_ref"
git checkout 'self-care/server-go-logging-adx-visibility-14b1bd465a4945b9'
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d "$temp_ref"

# Push the branch to the target remote
git push 'origin' 'self-care/server-go-logging-adx-visibility-14b1bd465a4945b9'

# Create the pull request
gh pr create --title '[self-care:server-go-logging] Extract ADX visibility digest comparison with diagnostic logging' --base 'main' --head 'self-care/server-go-logging-adx-visibility-14b1bd465a4945b9' --repo 'githubnext/gh-cao'

Generated by SelfCare / Server Go Logging · copilot · routed: sonnet55 high · ~72 AIC · ⌖ ~2 AIC · ⊞ 9.1K · history

  • expires on Dec 5, 2026, 11:40 AM UTC
Lingua principale
JavaScript
Stelle
23
Fork
8
Merge medio
7h 18m
PR unite (30g)
426

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di githubnext/gh-cao

Tutte le issue di githubnext/gh-cao

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.