Skip to content

[P2][OCR] Tighten context-pack field filtering and mismatch diagnostics #53

Description

@Ryder-Sun

Source: OCR_ANALYSIS_REPORT.md, OpenCode Review report generated on 2026-08-12.

Findings: M-8, L-3. desktop/src/collaboration/context-pack-records.cjs uses broad includes() checks for forbidden field names, which can reject legitimate fields such as token counts or command history. The same area also reports byte/hash mismatch errors against the wrong field path, which makes debugging harder.

Expected fix:

  • Replace broad substring matching with exact or boundary-aware forbidden field checks.
  • Report wirePayloadBytes mismatches on the byte field path rather than wirePayloadHash.
  • Add tests for legitimate token-count style fields and malformed wire payload diagnostics.

Activity

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:harnessMulti-Agent orchestration, run state, and collaborationenhancementNew feature or requestpriority:p2Platform expansion after core runtime worksecuritySecurity, permissions, credentials, or supply-chain boundary

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions