## TL;DR
When an agent run to report the uploaded build hits this failure - generated wrong values and validation failed - do not retry the same step blindly. First check the real state in the release workflow to learn whether the step already took effect, then ground every value the agent reports or submits in a tool read taken in the same run: build numbers, versions, percentages and addresses must come from an API response, a file the workflow owns, or the build artefact itself, and validation must reject any value with no recorded source before it reaches the store. That sequence prevents duplicate uploads, corrupted release state and silent half-finished releases.

```text
agent hallucinating a build number that was never uploaded: generated wrong values and validation failed with error
```

## Use this when
- An automated release run to report the uploaded build failed with this pattern.
- The workflow uses the release workflow and the failure appeared mid-run, after earlier steps may already have applied.
- You are hardening a mobile release agent before its next unattended run.

## Not for this skill when
- A human running the same step manually in a terminal or console succeeds. That points at the underlying tool, not the agent wrapper.
- The store rejected the release on policy or metadata grounds. That is a store review issue, not an agent reliability failure.

## Steps
1. Find every place the run stated a build number and compare each value against the release workflow or the artefact itself to see which were invented. Verify: each reported value is marked sourced or invented
2. Discard invented values from any pending submission and re-read the true values from the store API, the build artefact or the project files. Verify: corrected values are recorded with the read they came from
3. Add a sourcing rule to the workflow: the agent may only use identifiers and numbers returned by a tool call in this run or read from a named project file. Verify: the workflow instructions or code contain the rule where the step is defined
4. Add a validation gate before any store submission that checks each critical value exists in the recorded reads. Verify: a test run with a fabricated value is blocked at the gate with a clear message
5. Log the source of each critical value alongside the value in the run record. Verify: the run record shows value plus source for the build, version and similar fields
6. Re-run the workflow to report the uploaded build with the gate active. Verify: the run completes and its record shows only sourced values
7. Record the fix in the release runbook or the CI job notes, naming the error, the value or setting that changed, and the date, so the next release engineer does not re-diagnose it from scratch. Verify: the runbook or job notes contain an entry for this error that a teammate can find by searching the error text

## Why it happens
Language models complete patterns fluently, so a missing build number or percentage gets invented in the right format and passes eyeball checks. Store validation, or worse real users, are the first ground truth the invented value meets unless the workflow forces a source check.

In practice this failure is rarely a one-off. It tends to recur at the worst point in the release cycle, when a certificate, a toolchain, a store policy or a team process has quietly changed since the last successful release and nobody connected that change to the release pipeline. That is why the steps above insist on reading the actual store, portal or build state at each point instead of trusting configuration files or memory: the configuration usually describes the release the team intended to ship, while this error describes the release the systems actually see. Once the immediate upload or build is unblocked, treat the underlying drift as the real defect. Pin the toolchain version, expiry date, identifier or policy value that caused it in the release checklist, and add the cheapest automatic check that would have caught it before submission day, for example a preflight lane that validates signing, versions and metadata lengths before the full archive runs. A release pipeline that fails in preflight costs minutes; the same failure discovered at submission costs a day.

## Variants and edge cases
### agent failed to report the uploaded build reliability playbook
The workflow-hardening phrasing: state checks, budgets and resumability for this step. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.
### the release workflow agent workflow failure recovery
The recovery phrasing: establish real store state first, then resume without duplicating applied steps. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.
### Edge case: partial application
The hardest variant of every agent failure is the half-applied release. Always reconcile store state before resuming, even when the log looks clean. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_C98QU4mIvSbR-9mBRWkyLg
