Skip to content

Commit 3baf1ea

Browse files
os-litantclaude
andauthored
fix(spec): check:skill-examples refuses instead of degrading when a marked example does not parse (#12308)
* fix(spec): refuse instead of degrading when a marked example does not parse check:skill-examples derives each block's build-file extension from its fence language, so a marked block whose body is JSX under a ```ts / ```typescript fence lands in a .ts file where JSX is a syntax error. TypeScript reports syntactic diagnostics and then stops, so the semantic pass never runs -- for any file in the program. The run did go red (measured), but in the vocabulary of a semantic result, over a surface whose semantic pass had not run, and nothing in the output said so. Two guards separate those states. Marked blocks that do not parse now produce a REFUSE verdict naming the surface and the number of blocks left unchecked, with a tsx-retag prescription when the body really is JSX; the unmarked JSX-under-a-ts-fence population is swept before anyone arms it. The green line is printed only when every surface reached tsc, and says so. Sweep repairs: five unmarked JSX blocks fenced ```typescript across content/docs/** retagged ```tsx. skills/** carries none. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NDGG54XF5gbTLdQzCtnaVV * refactor(spec): give REFUSE its own verdict token, distinct from a failed check `✗ ⛔ REFUSE` stacked two prefixes and read as one emphatic failure rather than as a different KIND of failure. A refusal ("this gate produced no result") and a failure ("this gate produced a result and it is bad") now print two tokens a reader can tell apart and grep for. Same exit code: a refusal is still red. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NDGG54XF5gbTLdQzCtnaVV --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a6b6e54 commit 3baf1ea

4 files changed

Lines changed: 599 additions & 20 deletions

File tree

content/docs/api/error-handling-client.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ async function parseApiError(response: Response): Promise<ObjectStackError> {
130130

131131
Map field-level errors from the API response directly to form fields:
132132

133-
```typescript
133+
```tsx
134134
import { useState } from 'react';
135135

136136
interface FormErrors {
@@ -302,7 +302,7 @@ function sleep(ms: number): Promise<void> {
302302

303303
Catch unexpected errors at the component tree level:
304304

305-
```typescript
305+
```tsx
306306
import { Component, type ReactNode } from 'react';
307307

308308
interface ErrorBoundaryState {

content/docs/protocol/objectui/concept.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Authorization: Bearer <token>
345345
```
346346

347347
**Renderer Logic (Simplified):**
348-
```typescript
348+
```tsx
349349
function FormRenderer({ layout }) {
350350
return (
351351
<Form title={layout.title}>
@@ -644,7 +644,7 @@ A conformant ObjectUI renderer must:
644644

645645
Renderers maintain a mapping from JSON types to components:
646646

647-
```typescript
647+
```tsx
648648
const componentRegistry = {
649649
text: TextFieldComponent,
650650
email: EmailFieldComponent,

content/docs/protocol/objectui/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Dashboard.create({
315315

316316
### 1. Declarative Over Imperative
317317

318-
```typescript
318+
```tsx
319319
// Imperative (React)
320320
function TaskList() {
321321
const [tasks, setTasks] = useState([]);

0 commit comments

Comments
 (0)