Skip to content

research_workflow_items: the ids command reads the package manifest shape-trusted — wrong-shape package.json surfaces as bare Attribute/Key/Type errors naming no file or field, not the tool's fail() diagnostics #6856

Closed

Description

@dezren39

research_workflow_items: the ids command reads the package's package.json manifest shape-trusted — wrong shapes surface as bare Attribute/Key/Type errors naming no file or field, not the tool's fail() diagnostics

Summary

scripts/research_workflow_items.py list_ids (the ids command, :952) reads the research package's own package.json manifest with a bare json.loads(...).get("segments", []) (:956-957) and projects [s["id"] for s in segments] (:976) with no shape validation at all. A valid-JSON-but-wrong-shape manifest therefore surfaces through the CLI's catch-all as a bare Python error that names neither the file nor the field — the exact failure mode #6854 filed for scripts/research_workflow.py's profile/state/trigger inputs, in the sibling module #6854 did not cover (its scope was research_workflow.py only; package.json / list_ids / segments appear nowhere in it).

The rest of this tool family validates with fail() diagnostics that name the file and the expectation (e.g. sync_research_workflow.py's load_json_object: "expected a JSON object"; research_workflow.py's field-level fail() checks). This one read is the unguarded remainder.

Verified this run (laptop probe, real CLI end-to-end, @65beb42c1a)

Probe: ~/git/fleet/probe-rw-items (research_workflow.py + research_workflow_items.py + research_workflow_live.py copied verbatim; package created through the real init CLI exactly as scripts/tests/test_research_workflow_items.py does; then ids --package <pkg> against crafted package.json files). Controls behave as designed:

package.json Observed
absent (control) rc=0, ids listed, segments: []
{"segments":[{"id":"S1"},{"id":"S2"}]} (control) rc=0, segments listed
[{"id":"S1"}] (list top level) rc=1, error: 'list' object has no attribute 'get'
"hello" (string top level) rc=1, error: 'str' object has no attribute 'get'
{"segments":"S1S2"} (segments as string) rc=1, error: string indices must be integers, not 'str'
{"segments":{"id":"S1"}} (segments as object) rc=1, error: string indices must be integers, not 'str' (iterates the object's keys)
{"segments":[{"name":"x"}]} (segment missing id) rc=1, error: 'id'
{"segments":["S1"]} (segment as string) rc=1, error: string indices must be integers, not 'str'
not json rc=1, error: Expecting value: line 1 column 1 (char 0) — no filename

No case names package.json, the segments field, or the expected shape; the non-JSON case doesn't even name the file that failed to parse. (The CLI catches the exceptions, so there is no traceback — the defect is the undiagnosed message, same as #6854.)

Why it matters

Acceptance criteria

Activity

  1. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor
  2. added
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    app/research-workflowscripts/research_workflow* + sync_research_workflow tooling
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 7, 2026
  3. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  4. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · picked up

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 8, 2026
  6. 17 remaining items

  7. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · parked

  8. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked (CI pending)

  9. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-code-h — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-h posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  10. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-h: MID-SHIFT FALLBACK: backend failed at checkpoint (task 11083 not-claimed verdict after claimed checkpoint succeeded); tests passed 17/17 on laptop, merging PR 7007 next

  11. added a commit that references this issue on Nov 8, 2026
  12. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 8, 2026
  13. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  14. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Released by repo-worker-code-h (outcome: done). task 11083 fixed_merged: PR #7007 merged 5e3ad18, issue #6856 closed; tests: unittest scripts.tests.test_research_workflow_items 17 OK on laptop; no Codex findings posted; PR #7007

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

    app/research-workflowscripts/research_workflow* + sync_research_workflow toolingkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions