Skip to content

id(test): oversize (non-trapping) view/layout degrade branch has no test — only the trap case is covered #1375

Closed

Description

@dezren39

Gap (filed from #1076 slice 6 — Phase 9 validation, coverage gaps)

The F11.17 degrade-don't-poison behavior has a regression test for the trapping view case but none for the oversize (non-trapping) case, even though they are separate branches in the actor:

  • pkgs/id/src/world/actor.rs — WorldCommand::View (~L1092) and WorldCommand::ViewAt (~L1131): when the returned presentation text exceeds limits.presentation_bytes (default 8192), the actor increments view_failures and returns Err("world presentation exceeds {} bytes") without touching program_healthy.
  • The only test of this family is a_trapping_view_degrades_to_an_error_and_recovers_on_the_next_event (pkgs/id/src/world/tests.rs:2416), which drives the trap branch (TrapsOnce) and asserts recovery. No test drives a guest whose view/layout returns more than presentation_bytes of text.

Verified on main 6f4532abb5ec0b432030c711d6b5aacd12f6099a (2026-10-27): grep for view_failures assertions in tests finds only the trap test; the oversize branches have no test coverage.

Acceptance criteria

  • A test (mirroring the trap test's shape, e.g. a fake program returning an over-limit view) asserts: oversize View → error naming the byte limit, view_failures == 1, program_healthy still true, and a subsequent in-limit view succeeds.
  • Same assertion for the ViewAt/layout branch, or a recorded reason one test covers both.
  • Test runs in the existing green suites (no new harness).

Source: #1076 slice 5 closeout flagged this branch as deserving its own assertion; slice 6 verified the gap against current main.

Activity

  1. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    priority/highImportant and time-sensitive
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    nowOrg Project gate: active priority — orchestrator adds to the board
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane 1a180ae5-384f-4e71-8d77-08f7b1652c75 (openchamber scheduled lane)
    • Task: queue task 2570 (triage of this issue)
    • Revalidation: issue OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit absent); no open PR references this issue; no other agent owns it.
    • Next: verify the gap against current main, then post the triage verdict and route (follow-up fix packet) or close with evidence.
  4. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triage verdict (confirmed, narrowed, routed)

    • Agent: queue worker (repo-worker-code), lane 1a180ae5-384f-4e71-8d77-08f7b1652c75 · queue task 2570
    • Verified on: main 0e26fa4b3 (2026-11-02)
    • Finding: gap CONFIRMED but narrower than filed. The ViewAt/layout oversize branch is now covered — ada299c7d changed layout-oversize from Err to a cropped-view fallback and added an_oversized_layout_degrades_to_a_view_fallback_and_recovers (tests.rs:3152). Still untested: the WorldCommand::View oversize branch (actor.rs ~L1300 — view text over limits.presentation_bytes yields Err("world presentation exceeds …"), view_failures+1, program_healthy untouched) and the same-shape HostView branch (~L1264). No test drives a guest whose view() returns over-limit text.
    • Routing: enqueued small_fix follow-up (queue task 6587): add the oversize-View regression test mirroring the trap test's shape (error names the limit, view_failures == 1, healthy, next in-limit view recovers); cover HostView or record why one test suffices.
    • No competing work: no open PR references this issue; no hard-stop labels.
  5. added
    work/assignedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
  6. 21 remaining items

  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — state: parked (task 6587, OpenChamber scheduled lane)

  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    task: 6587
    lane: code-l
    transition: parked
    state: Task 6587 resumed from awaiting_ci and re-verified fresh: PR #4679 OPEN, MERGEABLE, head daf6811 matches the checkpointed commit; Codex review completed on that head with no findings; targeted evidence stands (cargo test world:: — 163 passed incl. both new oversize View/HostView regression tests). The only blocker is the required basic guard (OpenCode metered-provider guard), still QUEUED since 2026-11-03T00:22:51Z — over an hour, the same fleet-wide stall that deferred PRs #4680/#4698 last shift. Parking task 6587 for 20m per the CI rule; resume merges PR #4679 as soon as the guard goes green.

  9. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  12. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · correction

    • Agent: queue worker (repo-worker-code), lane code-f
    • Session / ID: task 6587
    • Correction: my done note on this issue said the laptop world suite ran 164 passed. The full test output shows the accurate figure: cargo test -p id --lib world:: — 163 passed, 0 failed on head daf6811 (matching PR id(test): add oversize View/HostView regression tests #4679's own verification note). The conclusion is unchanged: both new oversize tests are in merged main (OversizedViewOnce, pkgs/id/src/world/tests.rs:3668; View test at :3685, HostView variant at ~:3736) and the suite is green. Only the count in my note was wrong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/testTest coverage, test infrastructure, or test-only fixesnowOrg Project gate: active priority — orchestrator adds to the boardpriority/highImportant and time-sensitive

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions