Skip to content

fix: keep report evidence consistent across collectors - #28

Open
oldwinter wants to merge 7 commits into
QoderAI:mainfrom
oldwinter:fix/core-change-watch-projections
Open

fix: keep report evidence consistent across collectors#28
oldwinter wants to merge 7 commits into
QoderAI:mainfrom
oldwinter:fix/core-change-watch-projections

Conversation

@oldwinter

@oldwinter oldwinter commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • identify Python/FastAPI projects without inferring Rails from a generic app/ directory
  • project bounded, documented Just recipes and exclude history-only paths from current-file recommendations
  • bind Session facts and lead analysis to one privacy-filtered population with redacted consistency checks
  • expose dimension tracks as validated progressbars and keep bounded Chinese phrases together in self-contained HTML reports
  • render canonical summary-facts Episode coverage in visible Evidence cards while retaining the legacy fallback

Why

  • Issue/Story: None. This is focused maintenance from a validated Better Harness review of a real FastAPI/Just repository, followed by spec-first regressions and browser QA.
  • Outcome: project and Session evidence no longer contradicts itself, report actions point to current executable surfaces, and HTML reports are more accessible and readable in Chinese.

Traceability and Scope

  • Specs: docs/specs/2026-07-30-core-change-watch-profile-and-current-paths.md; docs/specs/2026-07-30-session-population-binding.md; docs/specs/2026-07-30-html-dimension-progressbar-semantics.md; docs/specs/2026-07-30-html-cjk-line-breaking.md; docs/specs/2026-07-30-html-summaryfacts-episode-coverage.md
  • Acceptance criteria: framework-specific classification; bounded unverified Just entrypoints; current-path filtering; shared privacy-scoped Session population and fail-closed bindings; complete score-bound progressbar semantics; bounded zh-CN phrase wrapping with escaped fallback; canonical Episode coverage precedence with legacy compatibility.
  • Owners changed: Core Change Watch projection, Session evidence-bundle orchestration/contracts, self-contained HTML renderer/validator, tests, docs, and changelog.
  • Non-goals: no score manipulation, synthetic Episodes, raw Session persistence, installed-plugin edits, dependency changes, release, or deployment.

Change Type

  • Feature
  • Bug fix
  • Tests only
  • Documentation/community
  • Refactor with no intended behavior change
  • Dependency, packaging, or infrastructure

Test and Review Evidence

Check Result
Focused Core Change Watch, Session population, Evidence Bundle, task-loop, report-run, CLI, and WorkBuddy integration suites 161/161 pass on tree 7b981dc2b4a98214c3c3cdbf81acb682c050c290
npm run check 1006/1006 tests pass
npm package verification Pass, 343 entries
runtime ZIP verification Pass, 366 entries
git diff --check, conflict-marker scan, unresolved-index scan, and exact-tree audit Pass
Independent code review and completion gate PASS on the same tree SHA, no findings

Manual and visual evidence:

  • Chrome 151 full-page QA at 375, 768, and 1280 pixels.
  • Target phrases 口径, 入口, 结论, and 命令 had zero split occurrences at every viewport and no document horizontal overflow.
  • The final report visibly matched 5/5 Sessions and 14/12 total/edited Episodes, retained zero findings, and scored 81/100 (exact mean 80.6).
  • Five progressbars exposed exact values 93/84/94/82/50; axe reported zero violations; console and page errors were empty; dialog focus restored after close.

Risk and Recovery

  • Compatibility: filesystem projections use portable Node path handling; segmentation is locale-gated and falls back to escaped readable text when Intl.Segmenter is unavailable.
  • Package/schema impact: shipped source, docs, and tests only; no dependencies, installed plugin cache, generated report artifact, or score data changed.
  • Rollback: the repair commits are independently revertible; upstream integration used normal merge commits without rewriting published history.
  • Residual risk: the current merge tree was validated on Linux with cross-platform fixtures. An earlier head passed the repository's Ubuntu Node 22/24, macOS, and Windows CI matrix. CI for the current head is waiting for the repository-required fork workflow approval.

AI Involvement

  • Level: Assisted
  • Review: diffs and rendered reports were inspected, focused/full/package checks ran, real target projections were exercised, browser interactions were verified, and independent code/completion reviews passed on the exact staged tree.

Checklist

  • Followed AGENTS.md, CONTRIBUTING.md, and canonical-owner guidance.
  • Kept the change focused and excluded unrelated local/generated state.
  • Kept tests and documentation aligned with delivered behavior.
  • Checked Markdown links and cross-platform behavior.
  • Ran package/runtime verification and updated CHANGELOG.md.
  • Confirmed the right to contribute under the MIT License.

oldwinter90 and others added 3 commits July 30, 2026 14:48
Require framework-specific detection signals, expose bounded root Just recipes as static unverified argv entrypoints, and filter current-work projections without removing raw history.

Implements docs/specs/2026-07-30-core-change-watch-profile-and-current-paths.md. Validated with focused red/green core tests, real database-caching projection assertions, doc-link tests, and npm run check (884/884).

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Discover and privacy-filter one frozen Session population before facts or lead hydration, then expose versioned digest/count bindings that fail closed on population, selection, and admission contradictions.

Implements docs/specs/2026-07-30-session-population-binding.md. Validated with focused red/green binding tests, a bound normal-depth database-caching bundle, documentation checks, and npm run check (892/892).

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Expose each fluency score as a validated progressbar and keep bounded Chinese word segments together in self-contained reports without changing English or embedded report data.

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

该 PR 旨在修复 Better Harness 报告在不同采集器/渲染器之间的“证据口径不一致”问题:通过冻结并绑定同一份隐私过滤后的 Session population,确保 Session facts 与 lead analysis 使用同一人口快照;同时改进 Core Change Watch 的项目画像与“当前可操作路径”投影;并强化自包含 HTML 报告的可访问性语义与中文可读性。

Changes:

  • 新增 Session population 冻结/选择/准入绑定与一致性校验,并在 evidence-bundle 中将 population 作为共享输入传递给 facts 与 lead,冲突时 fail-closed(稳定红码)。
  • Core Change Watch:框架识别改为“必须有框架特异证据”,新增根 Justfile 的静态 recipes 投影(unverified argv),并将 recommendedReads / followUpActions 过滤为当前真实存在的路径(保留历史证据但不推荐已删除文件)。
  • HTML renderer:维度分数轨道补齐 progressbar 语义并在 validator 中绑定数量与分数;zh-CN 可见文本使用 Intl.Segmenter 进行有界短词 keep-together 渲染与回退。

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/task-loop-source.test.mjs 覆盖传入冻结 population 时的复用与 lead 绑定输出断言。
test/session-population.test.mjs 新增 population/selection/admission 绑定与一致性校验的单测。
test/harness-report-render-cli.test.mjs 新增 progressbar 语义与 zh-CN 分词 keep-together 的渲染/验证回归。
test/core-change-watch.test.mjs 新增 FastAPI vs Rails 判别、Just recipes、历史路径过滤的回归覆盖。
test/better-harness-evidence-bundle.test.mjs 覆盖 evidence-bundle 共享 population、冲突 fail-closed、隐私红码与计数一致性。
scripts/session-analysis/session-population.mjs 新增冻结 population 与绑定/校验工具(population/selection/admission)。
scripts/harness-analysis/task-loop-source.mjs 支持从冻结 population 构建 inventory,并输出 lead 侧 sessionBinding。
scripts/harness-analysis/report-run.mjs 将 sessionPopulation 透传给 source 生成,并在 evidence 输出中携带 sessionBinding。
scripts/harness-analysis/renderers/html.mjs progressbar 语义与 validator 绑定;zh-CN 可见文本分词渲染与 CSS 约束。
scripts/harness-analysis/evidence-bundle/session-evidence.mjs 新增 collectSessionPopulation,并将 population 注入 facts collector 以对齐人口。
scripts/harness-analysis/evidence-bundle/index.mjs evidence-bundle 先采集共享 population,再并行采集/分析并输出一致性诊断。
scripts/core-change-watch/project-profile.mjs 框架识别收紧;新增根 Justfile recipes 静态投影为 entry candidates。
scripts/core-change-watch/evidence-pack.mjs recommendedReads / followUpActions 过滤为当前存在路径(保留历史证据但不推荐已删除文件)。
scripts/core-change-watch/core-candidates.mjs app/api 的通用路径理由语言中立化,并为 FastAPI 添加路径信号。
references/project-harness/core-change-watch.md 更新 Core Change Watch 的公开指导:框架证据、Just recipes、当前路径投影边界。
docs/specs/2026-07-30-core-change-watch-profile-and-current-paths.md 记录 Core Change Watch 证据与当前路径投影的 spec 与验收证据。
docs/specs/2026-07-30-session-population-binding.md 记录 Session population 绑定/隐私/失败闭合策略的 spec 与验收证据。
docs/specs/2026-07-30-html-dimension-progressbar-semantics.md 记录维度 progressbar 语义与验证绑定的 spec 与验收证据。
docs/specs/2026-07-30-html-cjk-line-breaking.md 记录 zh-CN 分词 keep-together 渲染与回退策略的 spec 与验收证据。
CHANGELOG.md 记录用户可感知的行为变化(Core Change Watch、Session 绑定、HTML 语义与中文换行)。

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/harness-analysis/evidence-bundle/index.mjs
oldwinter90 and others added 4 commits July 30, 2026 18:11
Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Integrate workspace topology and Cursor identity changes with the existing Core Change Watch, Session population, and HTML report specs. The merge preserves both contracts and makes the Claude ledger fixture hermetic to valid ancestor instructions.

Validated with 994/994 tests, npm package/runtime verification, and exact-tree independent review.

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Integrate WorkBuddy host routing with the existing Session population and report contracts. Preserve both sides of the upstream merge while keeping topology parsing and evidence sharing consistent.

Validated with 1006/1006 tests, npm package verification, runtime ZIP verification, and independent review of tree 7b981dc.

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants