Skip to content

AI: a provider's refusal in words, the key tested before AI on, and no brand words - #152

Merged
futurebuildai merged 41 commits into
refactor/v1from
refactor/g1-ai-words
Oct 15, 2026
Merged

futurebuildai merged 41 commits into
refactor/v1from
refactor/g1-ai-words

Conversation

@futurebuildai

@futurebuildai futurebuildai commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Item 130, N3 to N8: the provider's refusal in words, the key tested before AI reads as on, and no brand words.

What changes

  • N3, N4 (a refusal is not "no reader" and not a 500). A 401 or 403 from the provider is a refusal of the saved key. The material intake and PIM's descriptions, SEO and collateral routes answer 502 in the wire envelope with the code ai_refused and "Anthropic refused the saved key. An administrator can enter it again in Tech Admin, AI Settings." The no key case is unchanged. A pasted or text list is still read by the rule reader when the key is refused. The intake and the three PIM tabs show the words where they happened. The image route is unchanged: it answers 202 and generates after, so a refusal there is the media row's failed status.
  • N7. Saving AI settings runs the provider test and stores its result; the document gains test_status (none, untested, passed, refused, failed) and test_message, and the test route stores its result the same way. Tech Admin reads "AI on" only after a passed test, "AI off: Anthropic refused the saved key" after a refusal, and says a saved key was not tested yet. The characterization harness points the server's provider at a local stand-in, so no test reaches the network.
  • N8. The illustration prompt asks for no words, labels, brand names or logos and no longer lists the text elements.
  • N5, N6. The intake's sample list and its test fixtures, and the demo import's CN_A35 ("Framing Angle A35"), carry plain product words; the seed's brand check lists "quikrete", "tyvek" and "proframe angle".

Red first (each commit alone, failing on the base)

Leg Command At its first commit
Intake refusal go test ./internal/parsing -run TestWire_UploadProviderRefusal status 200 with the sample list, want 502
PIM refusal go test ./internal/pim -run TestWire_PIMGenerateRoutesAnswer status 500, want 502 (three routes)
Text list under refusal go test ./internal/parsing -run TestExtractItemsWithAI_TextList synthetic true
Save tests the key go test ./internal/techadmin -run 'TestWire_SavingAKey|TestWire_AnUntested' provider called 0 times, no test_status
Illustration prompt go test ./internal/pim -run TestIllustrationPrompt three failures
Brand words go test ./internal/parsing -run TestSampleList, go test ./internal/app/seed -run TestSeedDataHoldsNoBrandWord sample list and catalog hold the words
Intake words vitest MaterialIntake.test.ts no intake-ai-refused
PIM page vitest ProductContentTab.test.ts no pim-ai-notice (three tabs)
Tech Admin statuses vitest aiWords.test.ts AIProviderWords.test.ts refused and untested lines absent

All green at the head.

Contract

502 ai_refused on the intake and three PIM routes; test_status, test_message on the AI settings document; status on the test answer. merge -check, cmd/pending, api-client generate, drift and typecheck are clean; CONTRACT-CHANGES has the row; goldens techadmin_settings and machine_key re-recorded for test_status only.

Review round 1

  • P2-1 freight: the freight route answers 502 ai_refused with the sentence and "Until then, enter the freight total by hand."; the uploaded file is kept only after a successful read. Leg: go test ./internal/purchase_order -run TestWire_FreightUploadAnswers (400, want 502 at its first commit).
  • P2-2 image: a refusal settles the media row refused; the PIM page shows the sentence naming Tech Admin, AI Settings; the failed words no longer say try again. Legs: go test ./internal/pim -run TestWire_PIMImageSettlesRefused, vitest ProductMediaTab.test.ts, aiWords.test.ts.
  • P2-3 CI network: the e2e save types http://127.0.0.1:9/api/v1; a guard (e2eNoNetwork.test.ts) fails on any non loopback host in a spec.
  • P3s: only a 401 refuses OpenRouter's key; the stored test names its settings revision (a mismatch reads untested); an unreachable provider answers in a sentence, the save's test has its own timeout and a storage error after the commit is logged; the sanitiser drops text and tspan; the extraction prompt example and the tax test are plain and openrouter.go joins the brand check; the intake leg drives the file input; the AI feature grid follows aiIsOn.
  • ProFrame: the 74 product descriptions that named it take plain names; vendor records and keys, and the model designations, stay (the principal's call). The seed check bans "proframe" in descriptions.
  • Not done: an environment key changed across a restart still keeps an old passed (the revision does not move); PR 147 is not on refactor/v1, so its colour check is not on this branch (the amber notices wait for it); the order of the merge of refactor/v1 is current as of this push.

🤖 Generated with Claude Code

futurebuildai and others added 30 commits October 14, 2026 13:29
…rds (red)

Item 130, N3. The intake answers the canned sample list, and the page says no
reader is set up, when the provider refused the saved key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, N4. The routes answer a bare 500 the page cannot explain.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…(red)

Item 130, N7. AI on means a key is saved, not that it works.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…or logos (red)

Item 130, N8 (FROM-PRINCIPAL 118 a).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, N5 and N6.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…(red)

Item 130, N3. A pasted list needs no AI reader; the refusal must not take it
down.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, N7. A refused key reads AI off with the provider named; a saved key
that was not tested says so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…e (red)

Item 130, N3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, N4.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
A 401 or 403 from the provider is a refusal of the saved key, not no reader and
not a bare 500. The intake and the PIM generate routes answer 502 with the
code ai_refused and the sentence naming the provider and what to do; a text
list is still read by the rule reader. The contract names the new answer.

Item 130, N3 and N4.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
A save runs the provider test and stores its result; the document's
test_status is none, untested, passed, refused or failed, with the plain
sentence for the last two, and the test route stores its result the same way.
The characterization harness points the provider at a local stand-in so a
save's test never reaches the network; the two goldens gain test_status.

Item 130, N7.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…nd the import

The illustration prompt asks for no words, labels, brand names or logos and no
longer lists the text elements. The sample list and its test fixtures, and the
demo import's framing angle, carry plain product words.

Item 130, N5, N6 and N8.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…test

The intake and the PIM generate tabs show the refusal where it happened, the
AI settings read the last test (AI on, AI off with the provider named, or not
tested yet) and say what a save's test found. The generated types follow the
contract.

Item 130, N3, N4 and N7.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, N3, N4 and N7.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
The save tests the key with the provider, and a placeholder never passes.

Item 130, N7.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, review round 1 P2-1. The route answers a bare 400.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, review round 1 P2-2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…answers in words (red)

Item 130, review round 1 P3-1 and P3-3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…red)

Item 130, review round 1 P3-4.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, review round 1 P3-5.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, review round 1 item 6, FROM-PRINCIPAL 118 a.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…ve speaks in words (red)

Item 130, review round 1 P3-2 and P3-3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, review round 1 P2-3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…eatures (red)

Item 130, review round 1 P2-2 and P3-9.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
… no file

The freight invoice route answers 502 ai_refused with the sentence and "enter
the freight total by hand"; the uploaded file is kept only once the read
succeeded.

Item 130, review round 1 P2-1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
No retry is offered for a refusal; the media tab shows the sentence naming Tech
Admin, AI Settings, and a plain failure no longer says try again.

Item 130, review round 1 P2-2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…sion and speaks in words

A 403 from OpenRouter is moderation, not the key. The stored test result
carries the settings revision it ran on, a mismatch reads untested. An
unreachable provider answers in a sentence, the save's test has a timeout of
its own, and a storage error after the commit is logged, not answered.

Item 130, review round 1 P3-1, P3-2, P3-3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
A second guard for no words on a drawing. The two older cases that pinned a
label are gone with the labels.

Item 130, review round 1 P3-4.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
The 74 descriptions that named ProFrame take plain names. The invented vendor
records and keys stay, and so do the model designations for now.

Item 130, review round 1 P3-5 and item 6.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
… party

The features grid lights on aiIsOn, the intake's refusal leg drives the file
input, the Tech Admin save spec types a loopback base URL, and the guard reads
the specs folder by path.

Item 130, review round 1 P2-3, P3-7, P3-9.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
futurebuildai and others added 11 commits October 14, 2026 15:17
…nd's row

Item 130, review round 1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…s not a save (red)

Item 130, PR 152 round 2. Save A's slow test passing after save B's refused
test reads passed for B's key; a pressed Test connection on an unreachable
provider says the key is saved.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…sed (red)

Item 130, PR 152 round 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
… a press does not say saved

The revision is read before the provider is asked, and a result of an older
revision never replaces a later one, so out of order tests leave the last
key's result. A pressed test on an unreachable provider says it could not be
reached, not that the key is saved. The revision leg's comment no longer says
the race cannot happen.

Item 130, PR 152 round 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, PR 152 round 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, PR 152 round 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, PR 152 merge round.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Item 130, PR 152 merge round.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
@futurebuildai
futurebuildai merged commit 1a44976 into refactor/v1 Oct 15, 2026
25 of 27 checks passed
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