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

未关闭 适合新手
#21,725 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
技术栈
go

调研方向

从 server/internal/adxingest/client.go 开始,重点关注 Client.Verify 和拟议的 checkVisibleDigests 函数。检查针对所列每种可见性失败模式的直接单元测试,然后运行 go -C server test ./...。当 Verify 的行为保持不变、诊断日志仅公开固定的原因代码和计数,并且完整测试套件通过时,即完成此次更改。

由索引模型根据 Issue 内容生成。

描述

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
主要语言
JavaScript
星标
23
派生
8
平均合并
7 小时 18 分钟
30 天内合并 PR
426

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

githubnext/gh-cao 的其他 Issue

查看 githubnext/gh-cao 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。