Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ title: "Mock Rate Limit Scenarios and Test Contracts"
owners: [bingran-you]
soft_links: [/platform-services/claude-ai-limits-and-extra-usage-state.md, /reconstruction-guardrails/verification-and-native-test-oracles/native-test-derived-asset-provenance-and-acceptance-rules.md, /reconstruction-guardrails/verification-and-native-test-oracles/test-lane-coverage-map.md]
native_source: services/mockRateLimits.ts
native_ref: services/mockRateLimits.ts#scenario-surface
test_asset_origin: source_snapshot_derived
acceptance_rule: Preserve an internal-only mock surface that deterministically exercises the distinct user-visible quota and overage branches without stale residue between cases.
verification_status: native_test_derived
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ The current repo already uses domain-owned leaves for native-test-derived assets
- rate-limit mock scenario contracts
- sed command validation contracts
- YOLO classifier contracts
- end-to-end permission testing contracts
- shared preload and shard-isolation contracts

This is the right ownership model: the acceptance oracle lives with the subsystem that owns the behavior.

Expand All @@ -29,9 +31,18 @@ When a leaf is derived primarily from upstream-native tests or testing-oriented

- the owning concern domain
- explicit provenance markers such as `native_source` where that is clear and useful
- a `test_asset_origin` marker that says whether the asset is source-snapshot-derived, released-binary-observed, or a clearly labeled hybrid
- an optional `native_ref` marker when a finer source pointer than one file path is useful
- a short `acceptance_rule` marker that states what kind of regression should be treated as failing this asset
- a verification marker such as `verification_status: native_test_derived` when the leaf is intentionally restating upstream test oracles
- behavior and acceptance guidance, not copied prompts, copied code, or repo-internal execution trivia

Recommended current values:

- `test_asset_origin: source_snapshot_derived` for assets extracted mainly from the leaked source snapshot
- `test_asset_origin: released_cli_observed` for assets extracted mainly from black-box CLI exercise
- `test_asset_origin: mixed_evidence` only when the leaf truly depends on both and says so explicitly

## What these leaves should contain

A good native-test-derived leaf should usually include:
Expand All @@ -41,6 +52,7 @@ A good native-test-derived leaf should usually include:
- important state or parser edge cases
- the likely reconstruction mistakes another team would make without this oracle
- acceptance criteria when the evidence is strong enough to phrase them safely
- concise frontmatter that lets future agents classify the asset before reading the whole leaf

## What they should not become

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ soft_links:
- /platform-services/settings-change-detection-and-runtime-reload.md
- /tools-and-permissions/permissions/e2e-permission-testing-contracts.md
native_source: test/preload.ts
native_ref: test/preload.ts#same-process-reset-layer
test_asset_origin: source_snapshot_derived
acceptance_rule: Same-process and sharded tests must clear sticky product state through the shared preload path so later cases do not inherit caches, hooks, or timeout debt.
verification_status: native_test_derived
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ title: "Sed Command Validation Contracts"
owners: [bingran-you]
soft_links: [/tools-and-permissions/filesystem-and-shell/shell-command-parsing-and-classifier-flow.md, /tools-and-permissions/permissions/permission-decision-pipeline.md, /reconstruction-guardrails/verification-and-native-test-oracles/native-test-derived-asset-provenance-and-acceptance-rules.md]
native_source: tools/BashTool/sedValidation.ts
native_ref: tools/BashTool/sedValidation.ts#sedCommandIsAllowedByAllowlist
test_asset_origin: source_snapshot_derived
acceptance_rule: Preserve the narrow auto-allow path for clearly safe inspection/stdout-only sed while failing closed on ambiguous, persistent, or execution-capable forms.
verification_status: native_test_derived
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ title: "E2E Permission Testing Contracts"
owners: [bingran-you]
soft_links: [/tools-and-permissions/permissions/permission-decision-pipeline.md, /ui-and-experience/dialogs-and-approvals/permission-prompt-shell-and-worker-states.md, /reconstruction-guardrails/verification-and-native-test-oracles/test-runtime-mode-and-determinism.md, /reconstruction-guardrails/verification-and-native-test-oracles/e2e-harness-reality-boundaries.md]
native_source: tools/testing/TestingPermissionTool.tsx
native_ref: tools/testing/TestingPermissionTool.tsx#TestingPermissionTool
test_asset_origin: source_snapshot_derived
acceptance_rule: Admit the approval probe only in test posture and require it to drive the ordinary ask/grant/deny queue instead of a fake dialog shortcut.
verification_status: native_test_derived
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ title: "YOLO Classifier Contracts"
owners: [bingran-you]
soft_links: [/tools-and-permissions/permissions/permission-decision-pipeline.md, /tools-and-permissions/permissions/permission-model.md, /reconstruction-guardrails/verification-and-native-test-oracles/native-test-derived-asset-provenance-and-acceptance-rules.md]
native_source: utils/permissions/yoloClassifier.ts
native_ref: utils/permissions/yoloClassifier.ts#structured-verdict-contract
test_asset_origin: source_snapshot_derived
acceptance_rule: Keep the auto-approval classifier machine-readable, fail-safe, escalation-capable, and resistant to assistant self-justification.
verification_status: native_test_derived
---

Expand Down
Loading