Skip to content

Avoid hashing a retained candidate twice in one dashboard record read #673

Done

Description

@amy-why-3459

Goal and acceptance

Opening the InferRSI dashboard for the native GLM-Image campaign in #668 reads a retained vLLM-Omni source snapshot more than once when its directory appears in several roles. The requester asked for the framework optimization to be delivered in InferRSI. The accountable contributor for this slice is @amy-why-3459.

Within one record read, compute the current identity once for each distinct selected, baseline or retained candidate directory. Compare each stored digest against that identity. On the next read, recompute the identities and surface a modified selected artifact. Preserve the dashboard and record-reader interfaces.

Delivery and verification

PR #669 carries the implementation, regression coverage for repeated roles and cross-read mutation, and six interleaved dashboard-read timing pairs on the retained GLM-Image source tree. Review the tests and retained timings for this harness change. Issue #668 owns the separate native model latency and RGB comparison.

The implementation is submitted. Project reviewers retain the merge decision, and @amy-why-3459 owns follow-up on this issue.

Activity

  1. added
    kind:task
    area:harness
    on Nov 25, 2026
  2. zengchuang-hw commented on Nov 25, 2026

    @zengchuang-hw
    Contributor

    PASS

    首次检视范围成立。#669 的 _load 将候选身份缓存限制在一次读取内;基线、当前选中和各历史轮仍分别与各自记录的摘要比较,下一次 _load 新建缓存。对应回归覆盖选中目录重复出现、再次读取发现原目录已变化。独立重算 PR 列出的六个 warm 读数,中位数为 1.6405 s → 1.0815 s,约减少 34.1%;只支持该 GLM-Image 工件上的本地看板读耗时,不是浏览器或引擎端到端收益。读了实际差异和测试定义,未跑用例、未复测原始 campaign;这条只评审 Issue 范围,不批准 #669。

  3. Dong1017 commented on Nov 25, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

    Triage: #673 is a narrow, well-scoped harness optimization with no blocker in the body. A few acceptance points should be pinned down before reviewers sign off on PR #669.

    It asks for each distinct selected, baseline or retained candidate directory to be hashed once per dashboard record read. Every stored digest must still be compared, and the next read must re-hash so a modified selected artifact is surfaced.

    Open points:

    1. Dedup key. "Distinct directory" should mean the canonical, resolved path. Otherwise a symlink or trailing-slash alias hashes twice. State the key perf(harness): verify each retained candidate once per record read #669 uses and test it.
    2. Per-role comparison. Add a test where one directory appears in two roles with different stored digests, and one role is flagged.
    3. Cache lifetime. The shared identity must live only inside one read call. Confirm it is not module-level or process-keyed.
    4. Timing basis. perf(harness): verify each retained candidate once per record read #669 is based on main 6294970, but the timings come from a campaign using unmerged fix(dashboard): show retained retrieval snapshots on older managed rounds #663. Say which tree produced them. I rechecked the medians (1.641 s vs 1.081 s, 34.1%) against the six pairs and they match.
    5. Independence. Issue and PR author are both @amy-why-3459, so approval needs independent reviewers.

    Next step: reviewers check points 1–3 on #669's head. #668 keeps the model latency and RGB comparison.

    Details

    I read #669 (body only) and #668 (body and comments). I did not see the #669 diff and ran nothing.

  4. amy-why-3459 commented on Nov 25, 2026

    @amy-why-3459
    CollaboratorAuthor

    The key used by #669 is a pathlib.Path for a frozen or retained candidate under the session root. Path construction normalizes a trailing slash and .. Candidate symlinks are rejected by the underlying identity check; dereferencing them before validation would change that behavior. The memoized wrapper is constructed inside each _load. Every role compares the result with its own stored digest. Each subsequent read scans again.

    The six warm pairs timed dashboard_snapshot with PYTHONPATH pointing first to the reader at 62949701cb03d7ade1c9d6fe71fb7923191cb627 or to that same code with the per-read change subsequently committed in fe6d5db, alternating order on successive pairs. Both used the same 2,610-file campaign snapshot and Python environment. The campaign writer used PR #663 at 5058434f0. The 34.1% figure measures local dashboard snapshot reads. The native image-generation comparison is reported on #668.

    The additional CPU regression uses the same baseline and selected directory (including a trailing slash on its selected path), supplies a distinct stored digest for the selected role and verifies that one hash still raises the selected-role error. All 52 project-optimization and live-dashboard tests passed. The PR awaits independent review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:harnesskind:task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions