Skip to content

Build the final event for a scoped model and return four more findings to their authors (0.261.495) - #1986

Open
Paul Lizer (paullizer) wants to merge 8 commits into
microsoft:Developmentfrom
paullizer:claude/run-490-findings
Open

Paul Lizer (paullizer) wants to merge 8 commits into
microsoft:Developmentfrom
paullizer:claude/run-490-findings

Conversation

@paullizer

@paullizer Paul Lizer (paullizer) commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Ten changes from the run on 0.261.490: one error that affected every run, four findings that now go back to the model that can correct them, a tokenizer declaration in the model catalog, and five failures that now record their cause. Version 0.261.495 (renamed from 0.261.493 after Development took 0.261.493 and 0.261.494).

No prompt, tool description or instruction text is changed. Where a model is told more, it is in a typed finding: one it already receives, or the result of the function it called.

Changes

1. Every run ended with an error after its answer was saved

  • On 0.261.490 every harness run logged Headless message publication was not confirmed with a TypeError. The answer was saved and the outcome recorded as completed; the client that started the run was then sent an error and a final event saying the run failed and its message was not saved.
  • The answer model's metadata is spread into build_run_done_event. It gained model_scope_type and model_scope_id, which the event did not take.
  • The event takes and carries both. A test runs a finalization with a scoped answer model, and another ties every field the metadata can return to the event's arguments. Both fail on the previous code.

2. A calculation program that failed its schema was told only "schema"

  • 46 findings in the run, 28 of them repeating the one the author already held, and 13 ended steps. The validator's error was discarded.
  • Each departure is now located with schema_error_location, which the planner already uses. Up to eight go back to the author: keyword, path, the operation the step names and what the schema allows. A property the author invented is counted, never named.

3. An action whose model called no function ended its step

  • A reply that starts no function call is returned to the action's model once, as data (action_function_call_missing), with the functions it was offered. A second such reply ends the step as before. One more model call per occurrence.

4. Request size was counted in bytes for models the tokenizer library did not know

  • Two answer steps were refused at 1,060,988 and 3,908,035 bytes against an input budget of 903,560 tokens. The installed tiktoken resolves gpt-5 and gpt-5-*, not gpt-5.4 or gpt-5.6-sol.
  • model_capabilities.json: 33 OpenAI text records declare tokenizer, each with verified evidence from OpenAI's tiktoken model table as published for v0.14.0.
  • model_capabilities.schema.json: the field is optional and schemaVersion stays 4. A declaration needs verified evidence on the record; a hosting profile cannot carry one. The previous catalog is still valid under the new schema.
  • The budget reads the catalog's declaration first, matched the way numeric limits are (the record's id or a verified alias). A model the catalog does not declare is looked up in the library as before.
  • Nothing is declared for gpt-chat-latest or any non-OpenAI model; those keep the byte bound.

5 to 9. Failures that did not record their cause

  • A file step that fails before any render attempt logs the output's code and the error behind it.
  • An aggregate that meets a value it cannot read reports the value's kind and how many of the measure's values are unreadable. The author receives the same facts.
  • A request refused at planning records what the earlier attempts were refused for, whether the last repeats the previous, and where it was raised.
  • A completeness report with a rejected answer quote records which judgment and which rule. The checker's repair request carries the same facts.
  • Outside the harness: a refused question to the user names its rule and is logged once. Which condition refused the questions in the run is not known.

10. A faulty question specification ended the agent's answer

Every refusal from the ask-the-user function ended the agent's answer, including one the model that wrote the question could correct.

  • A fault in the specification is now the function's result, {"finding": {...}}: the code, the rule, where, and that no question was opened. The model can call again with a corrected specification.
  • One invocation's model is told up to twice (SPECIFICATION_FINDING_LIMIT). The next faulty specification is refused as before.
  • What counts as a fault in the specification is typed on the refusal (in_specification), not inferred: the text is not a string, is too large, is not JSON or is not an object; the requested schema is outside the flat-object restriction; a choice hint is one its field does not allow.
  • To say where, the validators report typed problems:
    • elicitation_schema_problems is now the one implementation of the schema restriction. validate_elicitation_schema renders the same sentences from it, so the planner's path is unchanged.
    • normalize_choice_hint raised one of three sentences for sixteen conditions. Each now raises ChoiceHintError with its rule and position. The sentences, and what is accepted, are unchanged.
    • A faulty choice hint used to be refused as input_unavailable, as if the store had failed. It is now a specification fault.
  • Positions are indexes (the second field, the third choice). A field's name, the type it asked for and a choice's text are never repeated, in the finding or in the log.
  • Refusals that are not about the specification (the run may not ask, the saved request changed or closed, the store is unavailable) are not returned and end the answer as before.

Ask-the-user records

The rule on a refusal says which state was missing, not how the run came to be without it. Five [USER_INPUT] records now carry how the run stood: whether it had an agent execution and a continuation, the continuation's mode, whether it was resumed, whether the continuation and the request each allow a question, and the agent's depth.

  • The refusal record, as above, with those fields and how many findings preceded it.
  • The question function was offered to an agent.: one per agent invocation that may ask, with whether the kernel already held the function. Each such invocation builds its own kernel, so a kernel that already holds it has outlived its invocation.
  • An agent's question to the user was opened., with whether this call saved the question or found it saved.
  • An agent received the answer to its question.
  • A question's specification was returned to its author., with the rule, the position and the finding count.

Before these, a question that opened left no record. Flags, counts and closed codes only: no part of a question or an answer, and no raw identifier.

Documentation

  • docs/explanation/fixes/RUN_ENDING_EVENT_AND_RUN_490_FINDINGS_FIX.md
  • docs/reference/logging-tags.md: the new fields and records.
  • docs/explanation/features/MODEL_CAPABILITY_CATALOG.md: the declared tokenizer.
  • docs/explanation/features/ORCHESTRATION_REACTIVE_LOOP_PROPOSAL.md: open items updated from the 0.261.490 run.
  • docs/explanation/release_notes.md: the 0.261.495 section, with the split pages regenerated.

Testing

  • Each change has tests that pass: the final event, schema findings (unit and through the authoring loop), the action finding (through the real HTTP path), the catalog audit and schema rules, request sizing, the file-step record, aggregate value kinds, planner refusal records, the completeness quote rule, the ask-the-user records and the returned specification finding (both through the real function-calling loop), each choice-hint rule, the schema restriction's typed problems, the validator the application binds, and the new fields through the real telemetry filter.
  • scripts/run_tests.py functional (every Python functional test file, each in its own process) on the merged tree with the release notes: 1,971 of 2,021 files passed, 6 skipped as known failures, 50 failed. Accounting for the 50:
    • 1 was a regression from this PR, fixed in a later commit: test_orchestration_research_selection.py failed 17 tests because the planner's refusal records call exception_log_fields, which the offline loader in test_support/orchestration_research.py did not supply. The loader now loads the real helper. The file has the same counts as on Development (19 passed, 24 expected failures, 51 subtests), and the 32 test files that share the loader pass.
    • 31 need something the machine that ran them lacks: the V2 UI's node_modules (25) and the docxcompose or redis_entraid package (6). CI installs these.
    • 10 fail with identical counts on unchanged Development when run alone on the same machine.
    • 8 timed out under the load of 16 parallel jobs. Each passes when run alone, including test_orchestration_harness_execution.py (727 passed) and test_orchestration_document_loader_reliability.py (28 passed), both of which this PR changes.
  • Three commits came after that run, and the full suite was not repeated for them locally. For each, the test files that cover the modules it touches were run on the tree that includes it, each in its own process:
    • The ask-the-user records and the loader fix: 31 files, all pass.
    • The returned specification finding: 44 files that touch questions, elicitation or the telemetry filter. 43 pass; test_v2_elicitation_answers.py fails one test the same way on Development (it needs node_modules).
  • scripts/check_cosmos_response_boundaries.py: 0 review gaps. One owner in functions_user_input.py is re-reviewed; its body is unchanged.
  • Not run locally: the JavaScript functional tests, apart from the one that calls the model capabilities module (10 checks pass). The worktree has no node_modules.

Not verified

  • Not run against a deployed application. What a browser shows for the final event was read from the code.
  • Not known: whether a faulty specification is what refused the questions in the run. If it was a condition of the run instead, change 10 does not affect it and the new records will say which.
  • Not changed: when anything raises after a run is closed, _finish still reports the run to its client as failed. That is what made one missing argument a failure for every run; it is recorded as an open item.
  • A deployment that has installed a signed catalog update keeps that catalog until a new one is published. A published catalog that uses tokenizer needs minimumAppVersion 0.261.495.
  • The context-usage counter looks up its own encoding and does not read the catalog.

🤖 Generated with Claude Code

…gs to their authors (0.261.493)

From the run on 0.261.490. No prompt, tool description or instruction text is
changed; where a model is told more, it is in the typed finding it already
receives.

- Every run ended with a TypeError after its answer was saved: the answer
  model's metadata gained model_scope_type and model_scope_id, which are spread
  into build_run_done_event, and the event did not take them. The client was
  sent "failed, message not saved" for a run recorded as completed. The event
  takes and carries both fields.
- A calculation program that failed its schema was returned as "schema, step 0".
  Each departure is now located with the planner's schema_error_location and up
  to eight go back to the author: keyword, path, the operation the step names
  and what the schema allows.
- An action whose model started no function call ended its step
  (action_results_missing). That reply is returned to the action's model once,
  as data, with the functions it was offered; a second ends the step.
- Requests for a model the installed tokenizer library does not know were sized
  in UTF-8 bytes against a limit in tokens. The model catalog declares the
  tokenizer of 33 OpenAI text models, with evidence from OpenAI's tiktoken model
  table (v0.14.0), and the budget reads it. The schema field is optional and
  schemaVersion stays 4.
- An aggregate that meets a value it cannot read reports the value's kind and
  how many of the measure's values are unreadable.
- Records that lacked their cause now carry it: a file step that fails before
  any render attempt, a request refused at planning (earlier attempts and where
  it was raised), a completeness report with a rejected answer quote, and a
  refused question to the user (its rule; outside the harness).

Docs: RUN_ENDING_EVENT_AND_RUN_490_FINDINGS_FIX.md, logging-tags.md,
MODEL_CAPABILITY_CATALOG.md, and the open items of
ORCHESTRATION_REACTIVE_LOOP_PROPOSAL.md updated from the 0.261.490 run.

One storage owner in functions_user_input.py is re-reviewed in
cosmos_response_boundaries.json; its body is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Development took 0.261.492 for the V2 upload queue while this branch was being
written, so this change is 0.261.493. The only conflict is the VERSION line in
config.py.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Development took 0.261.493 for the request intent check and 0.261.494 for the
full functional suite in CI while this branch was open. The version is renamed
in the files this change added or edited: the fix document, the logging and
catalog references, the proposal's open items, test headers and names, and one
Cosmos registry note. No code changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Development took 0.261.493 for the request intent check and 0.261.494 for the
full functional suite in CI. The only conflict is the VERSION line in
config.py; the planner and the Cosmos registry merged without one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Five entries under Bug Fixes: the run-ending event, schema findings for
calculation programs, the action reply without a function call, the declared
tokenizer in the model catalog, and the failures that now record their cause.
The split release notes pages are regenerated with
scripts/build_release_notes_pages.py.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…1.495)

A refused question names the rule that refused it, which says which state was
missing but not how the run came to be without it. Finding the cause would
have taken a second deploy and run.

- The refusal record also carries how the run stood: whether it had an agent
  execution and a continuation, the continuation's mode, whether it was
  resumed, whether the continuation and the request each allow a question, and
  the agent's depth.
- Three more records with the same fields: the question function offered to an
  agent (with whether the kernel already held it), a question opened (with
  whether this call saved it), and an answer returned to the agent. Before
  these, a question that opened left no record.

Flags, counts and closed codes only. No prompt or instruction text changed,
and a refusal still ends the agent's answer.

One Cosmos registry owner in functions_user_input.py is re-reviewed; its body
is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…now uses

The planner's refusal records name where a refusal was raised, through
exception_log_fields. The offline loader in test_support runs the planner's
definitions with only the dependencies it lists, and that one was not listed,
so every refused plan in test_orchestration_research_selection.py raised a
NameError (17 failures). The evaluation script that shares the loader was
affected the same way.

The loader now loads the real helper from functions_appinsights.py, as it
already does workflow_log_context. The file passes again with the counts it
has on Development: 19 passed, 24 expected failures, 51 subtests.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@paullizer Paul Lizer (paullizer) changed the title Build the final event for a scoped model and return three more findings to their authors (0.261.493) Build the final event for a scoped model and return three more findings to their authors (0.261.495) Nov 28, 2026
…261.495)

Every refusal from the ask-the-user function ended the agent's answer,
including one its author could correct: a specification that is not JSON, a
requested schema outside the flat-object restriction, or a choice hint its
field does not allow. The model was never told.

- A fault in the specification is now the function's result, a finding with
  the code, the rule, where, and that no question was opened. The model can
  call again with a corrected specification. One invocation's model is told
  up to twice; the next faulty specification is refused as before.
- What counts as a fault in the specification is typed on the refusal
  (UserInputError.in_specification), not inferred from its code.
- To say where, the validators report typed problems. The schema restriction
  has one implementation (elicitation_schema_problems), and
  validate_elicitation_schema renders the same sentences from it.
  normalize_choice_hint raised one of three sentences for sixteen conditions;
  each now raises ChoiceHintError with its rule and position. The sentences
  and what is accepted are unchanged.
- A faulty choice hint was refused as input_unavailable. It is now a
  specification fault.
- Positions are indexes. A field's name, the type it asked for and a choice's
  text are never repeated, in the finding or in the log.

Refusals that are not about the specification still end the answer. No
prompt, tool description or instruction text changed.

specification_not_text_or_too_large is split into specification_not_text and
specification_too_large. One Cosmos registry owner in functions_user_input.py
is re-reviewed; its body is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@paullizer Paul Lizer (paullizer) changed the title Build the final event for a scoped model and return three more findings to their authors (0.261.495) Build the final event for a scoped model and return four more findings to their authors (0.261.495) Nov 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant