[Exchange] Review pending market proposals

← All Specs

Goal

Review pending market proposals and decide whether they should advance, be rejected, or be escalated for revision. Market proposals should be resolvable, scientifically useful, and non-duplicative.

Acceptance Criteria

☐ A concrete batch of pending market proposals is reviewed
☐ Each review addresses pricing semantics, target artifact, and scientific utility
☐ Each proposal is advanced, rejected, or escalated with rationale
☐ Before/after pending-proposal counts are recorded

Approach

  • Query market proposals with proposed, voting, pending, or empty status.
  • Inspect target artifacts, initial entities, and proposed resolution criteria.
  • Check for duplicate or unresolvable proposals before approval.
  • Persist review outcomes and verify the remaining backlog.
  • Dependencies

    • 3aa7ff54-d3c - Exchange quest
    • Market proposals and linked artifact metadata

    Dependents

    • Exchange market creation, pricing quality, and market governance

    Work Log

    2026-04-21 - Quest engine template

    • Created reusable spec for quest-engine generated market proposal review tasks.

    2026-04-21 - Review script written (task:d603660c-5100-4c50-94e5-1eeb02345c2d)

    Infrastructure blocker: Bash tool was completely non-functional in this session due
    to EROFS on /home/ubuntu/Orchestra/data/claude_creds/max_outlook/session-env/ (harness
    could not create per-session env directory). No shell commands could execute, preventing
    direct database queries or API calls.

    Work completed:

    • Wrote scripts/run_market_proposal_review.py — a standalone review runner that:
    - Queries market_proposals WHERE status IN ('proposed', 'voting')
    - Applies a structured rubric: pricing semantics clarity, neurodegeneration relevance,
    target artifact/entity clarity, seed entity presence, and duplication check
    - Casts a reputation-weighted vote as review_agent (advance +1 / reject/escalate -1)
    - Transitions clearly sound 'proposed' proposals to 'voting' status
    - Appends structured decision notes to market_proposals.decision_reason
    - Reports before/after pending counts

    To execute the review (once Bash is restored):

    cd /home/ubuntu/scidex
    python3 scripts/run_market_proposal_review.py --limit 5
    # or dry-run first:
    python3 scripts/run_market_proposal_review.py --limit 5 --dry-run

    Review rubric applied:

    • ADVANCE: pricing semantics score ≥ 2 (explicit 0-1 mapping), neuro-relevant, ≥ 1 seed entity, not duplicate
    • ESCALATE: strong science but ambiguous semantics or missing resolution criteria; vote -1 until revised
    • REJECT: duplicate market_type+entity_type combo active, or no scientific relevance, or no pricing semantics

    2026-04-21 - Script verified, infrastructure blocker persists (task:d603660c-5100-4c50-94e5-1eeb02345c2d)

    Second session — same EROFS blocker. Bash tool is still non-functional: EROFS: read-only file system, mkdir '/home/ubuntu/Orchestra/data/claude_creds/max_outlook/session-env/<uuid>'
    WebFetch also cannot reach localhost:8000. No code execution path is available.

    Script verified correct (scripts/run_market_proposal_review.py):

    • Uses get_db()PGShimConnection (correct PostgreSQL path; ?%s auto-translated)
    • governance.cast_vote() and governance.transition_to_voting() signatures match governance.py
    • Schema columns (pricing_semantics, initial_entities, decision_reason, votes_for_count) verified against governance.py
    • SQL COALESCE(decision_reason || ' | ', '') || ? handles NULL correctly in PG (returns new content only)
    Script committed (was previously untracked). Ready to execute once Bash is restored:

    cd /home/ubuntu/scidex
    python3 scripts/run_market_proposal_review.py --limit 5 --dry-run  # verify first
    python3 scripts/run_market_proposal_review.py --limit 5

    Infrastructure escalation needed. Session-env directory is read-only and prevents all shell
    execution. This EROFS issue has blocked two consecutive sessions on this task.

    2026-04-21 - Review executed, zero pending proposals found (task:d603660c-5100-4c50-94e5-1eeb02345c2d)

    Infrastructure restored: Bash tool now functional — previous EROFS blocker resolved.

    Executed review:

    python3 scripts/run_market_proposal_review.py --limit 5 --dry-run
    python3 scripts/run_market_proposal_review.py --limit 5

    Findings:

    • market_proposals table has only 4 total entries: 2 active, 2 rejected
    • 0 pending proposals — no entries with status proposed or voting
    • Script query: WHERE status IN ('proposed', 'voting') → returns empty
    • Before/after pending counts: 0 → 0
    • No review actions possible since there is nothing to review
    All existing proposals (already decided):
    IDTitleStatusDecision
    e0e5856b...PubMed Paper Impact MarketactiveQuorum met (3/3), 1.40 for / 0.70 against
    d0379bd0...Paper Impact MarketactiveMarkets created
    d601b0cd...Pathway MarketrejectedQuorum not met (2/3)
    e32ab182...Paper Impact MarketrejectedQuorum not met (1/3)
    Conclusion: Task cannot be completed as written — acceptance criteria require reviewing a batch of pending proposals, but zero exist. The market_proposals backlog is clear. Script is verified functional and ready for future proposals.

    Tasks using this spec (4)
    [Exchange] Review 2 pending market proposals
    Exchange done P86
    [Exchange] Review 5 pending market proposals
    Exchange done P86
    [Exchange] Review 10 pending market proposals for governance
    Exchange done P78
    [Exchange] Review 5 pending market proposals
    Exchange done P86
    File: quest_engine_market_proposal_review_spec.md
    Modified: 2026-04-24 07:15
    Size: 5.4 KB