Skip to content

fix: sizing faculty — none-witness rule, raises keyword, triage rule #480

Closed

Description

@Jammy2211

Overview

Three defects in the sizing faculty's consequence/unattended grading (agents/faculties/sizing/_sizing.py), found by the witness campaign (PyAutoMind#398): a Witness: none — <reason> value is read as a real witness; raises in JUDGE_SURFACE_KEYWORDS fires on prose that only describes a crash; and draft/triage/ prompts grade like classified work. Each mis-derives tiers across the backlog that today only declared overrides correct.

Plan

  • Treat a Witness: value starting with none (case-insensitive, optional —/-) as no witness; rule 3 returns judge with reason Witness: none declared — <reason>.
  • Drop raises from JUDGE_SURFACE_KEYWORDS (prompt option a), relying on the existing error contract phrase. Measured on 233 backlog prompts: 15 move judge→glance in the derived tier; all 15 carry a declared tier (11 declared glance — the overrides become redundant; 3 declared judge hold by precedence), so the effective dashboard is unchanged.
  • Add a triage work-type rule: consequence judge ("classification still open"), unattended never; surface an unknown Unattended: value as a reason instead of silently falling through.
  • Unit tests for the none and triage rules (synthetic repo names only — tenant firewall); whole-backlog regrade before/after recorded in the PR.

Tier: glance — merge mode: auto-merge on green if the Witness passes, post-merge summary

Detailed implementation plan

Affected Repositories

  • PyAutoBrain (primary)

Branch Survey

Repository Current Branch Dirty?
organs/PyAutoBrain main clean

PyAutoBrain is currently claimed by organ-prompt-headings (PyAutoBrain#479, Codex) — this task is queued in planned.md blocked-by that task.

Suggested branch: feature/sizing-none-triage-rules

Implementation Steps

  1. declared_header (_sizing.py ~l541): when the witness value matches ^none\b\s*[—-]?\s*(.*), store witness=None and witness_none_reason=<rest>.
  2. estimate_consequence rule 3 (~l830): if witness_none_reason is set, reason Witness: none declared — <reason>; else keep today's reason.
  3. JUDGE_SURFACE_KEYWORDS (~l449): remove "raises "; update the comment above it with the measured regrade (15 prompts, all declared) and why error contract covers the real case.
  4. estimate_consequence rule 1: add triage beside release/human_review → judge, reason "work-type triage: classification still open".
  5. estimate_unattended: triage → never, reason naming triage. declared_header unattended branch (~l551): record an unknown value as unknown_unattended; effective_unattended appends a reason naming it.
  6. Tests: new tests/test_sizing_none_triage.py — none-witness → judge with the none reason; draft/triage/ prompt → judge + never; unknown Unattended value surfaced; raises \X`` prose no longer judged. Synthetic repo names only.
  7. Regrade: run the whole-draft regrade before/after and paste the moved list into the PR; assert no prompt moves cheaper→judge except the Witness: none — and triage ones.

Key Files

  • agents/faculties/sizing/_sizing.py — rules and keyword list
  • tests/test_sizing_none_triage.py — new unit tests

Original Prompt

Click to expand starting prompt

Sizing faculty: a none rule, keyword hits on prose that only describes a surface, and a triage rule

Type: bug
Target: pyautobrain
Repos:

  • PyAutoBrain
    Themes:
  • mind-workflow
    Difficulty: small
    Autonomy: safe
    Priority: normal
    Status: draft
    Consequence: glance
    Witness: estimate_consequence on a prompt whose Witness: value starts with none returns judge with a reason naming the none (unit test); the 14 prompts named below derive the tier their declared override carries today without the override, or the keyword change is recorded as declined per prompt with its reason; a draft/triage/ prompt derives judge with a reason naming triage (unit test); a whole-backlog regrade before and after is recorded in the PR, and no prompt's derived tier moves from a cheaper tier to judge except the six Witness: none — ones and the two triage ones.
    Review-minutes: 3
    Unattended: ready
    Filed: 2026-09-17

Three defects in agents/faculties/sizing/_sizing.py, all found by the witness
campaign (PyAutoMind#398, record complete/2026/09/witness-campaign.md) while
grading 137 prompts through it. Derived notify (organ-internal repo) is
overridden to glance here on purpose: a rule change in this module regrades
every prompt on the dashboard, so the before/after regrade deserves a look. This prompt is itself the
finding in miniature: the faculty derives judge for it on "public api,
defaults to, raises " because the words appear below, quoted as the keywords
they are.

1. No none rule

estimate_consequence rule 3 is if not witness: return "judge". The campaign's
Witness: none — <reason> form (the prompt's own "Done when" allows it) is a
non-empty string, so it is read as a witness and the prompt derives glance or
notify. Six prompts carry it today: multiwavelength_inversion,
ep_analytic_updates, ep_lbfgs_jax, board_without_gh (now archived),
brain_board_follow_ups, model_figures_6b2_slam_stages. Their declared
judge holds by precedence, so dashboard.md and the batch planner are right;
the derived reading, sizing --json, and any regrade that counts "witnessed"
are wrong. Fix: declared_header maps a value starting with none (case-
insensitive, optional —/- after it) to no witness, and rule 3's reason says
Witness: none declared — <the reason> so the disagreement report stays useful.

2. JUDGE_SURFACE_KEYWORDS hits on prose that describes a surface

The module's own "Known limit" paragraph predicts this; the campaign measured
it: 14 of 137 prompts needed a declared-glance override because a keyword
appeared in prose describing the thing being fixed, not a surface the task
changes. raises alone accounts for ten — every one a bug prompt whose title
or symptom section says "raises IndexError" about the crash it fixes:
mapping_overlay_follow_ups (autoarray), assertion_repr_recurses_forever,
emcee_crashes (since folded), model_function_cannot_resolve_config_priors,
pyautofit_prior_model_summary_header, stale_enable_pytrees,
mcmc_thin_zero_and_check_size_short_chain (autofit),
drawer_pix_initializer_exception_flake (euclid),
point_source_json_datasets_record_no_regime (pyautolens),
mesh_geometry_areas_transformed (autoarray). The other four: witt_wynne_solver_library_home
and wiki_currency_check_version_gate on "public api" (one names its deliverable's
API, the other names what a check hashes), point_solver_profiling_cells on
"defaults to" (a trap note about plane_redshift), unregistered_worktrees on
"reported by" (in its own witness). Inline code is already masked, which is why
"raises IndexError" trips but "raises RayTracingException" does not — the
same sentence grades differently depending on where the backticks fall.

Decide, do not guess, between: (a) dropping raises from the list and relying
on the error contract phrase the list already carries; (b) matching raises
only when it is not followed by a masked code token (a described exception)
and not in the title line; (c) keeping the list and documenting the override as
the intended path (then this section is a no-op and the 14 overrides stand).
Whichever it is, the before/after regrade in the witness is the evidence.

3. No triage rule

draft/triage/ prompts have no work-type rule anywhere in the faculty: they
derive ready and grade like any other prompt (two graded glance during the
campaign and were re-homed as bugs by hand). A prompt whose classification is
still open should derive judge with a reason naming triage, the same shape as
the release/human_review rule 1, and estimate_unattended should not call
it ready. Also seen: an unknown Unattended: value (needs-decision) is not
a grade the faculty knows and falls through to derived ready; either reject
it in declared_header or document the vocabulary.

Activity

  1. Jammy2211 commented on Oct 6, 2026

    @Jammy2211
    ContributorAuthor

    Sizing none, keyword and triage rules

    Completed 2026-10-06. Issue: #480
    PR: #482 — merged as 8c860cf.

    Explicit Witness: none is now an absent witness with its explanatory reason retained. Removed the broad raises keyword while retaining error-contract checks. Triage derives judge and unattended never; unknown unattended values explain their fallback. Declared overrides retain precedence.

    Validation: independent review CLEAN at 632aab2; independent real CLI synthetic cases and 41 targeted tests pass. Both GitHub CI matrix jobs (Python 3.12 and 3.13) succeeded in run 37475595478. Immutable whole-backlog witness replayed independently: 229 prompts, 15 derived judge-to-glance changes, five explicit-none promotions to judge, zero unintended promotions, no effective consequence changes. Historical keyword decisions and moved list are in the PR.

    Heart remained YELLOW for the exact human-acknowledged reasons: three aged PRs (autogalaxy_workspace, autolens_workspace, euclid_strong_lens_modeling_pipeline) and stale PyAutoNerves rehearsal source. No scientific API or downstream workspace behavior changed; CLI/regrade is the relevant smoke witness.

    Declared tier glance; approved auto-merge-on-green executed in-turn after every CI run/job was judged. No watcher outlives the turn. No pending release obligation for this Brain tooling change.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions