Skip to content

fix(dsh): accept rc.1 permission preset origin - #98

Merged
phodal merged 4 commits into
QoderAI:mainfrom
Cobb04:fix/dsh-0.1.1-rc1-permission-origin
Aug 21, 2026
Merged

fix(dsh): accept rc.1 permission preset origin#98
phodal merged 4 commits into
QoderAI:mainfrom
Cobb04:fix/dsh-0.1.1-rc1-permission-origin

Conversation

@Cobb04

@Cobb04 Cobb04 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

DSH 0.1.1-rc.1 adds an optional closed-enum origin field to persisted permission/preset events. Extend the existing exact DSH validator to accept the pinned field while preserving legacy origin-less evidence, fail-closed drift handling, and validation-only semantics.

Why

Traceability and Scope

  • Spec/ADR: docs/specs/2026-08-18-93-deepseek-harness-session-evidence.md, AC-12 through AC-16
  • Acceptance criteria addressed: strict legal enum acceptance, invalid-value and unrelated-key rejection, no semantic projection, real public-path qualification, and retained RC7/RC8 readiness
  • Canonical owners changed: scripts/session-analysis/platforms/dsh.mjs, its focused provider test, and the canonical Story [Feature]: Add partial DeepSeek Harness session-evidence adapter #93 spec
  • Explicit non-goals: full DSH 0.1.1 support, generic parser relaxation, new analytics or ownership semantics, default-facts privacy repair, configured assets, lifecycle, shell, packaging claims, Quickstart, SQLite, secret-scan, and CHANGELOG

Change Type

  • Feature
  • Bug fix
  • Tests only
  • Documentation/community
  • Refactor with no intended behavior change
  • Dependency, packaging, or infrastructure

Test and Review Evidence

Check Result
Focused rc.1 origin contract matrix 2 passed; 20 unrelated provider cases skipped
DSH fixture/discovery/provider suites 97/97 passed
DSH plus shared provider owners 149/149 passed
Fresh official @deepseek-ai/dsh@0.1.1-rc.1 E2E initial node --test failed; DSH fixed only the implementation; final test passed
Real artifact/public path 27 complete Zstd frames, 441 contiguous logical events, 5 completed steps, 5 usage-bearing assistant messages, 6/6 call-result pairs; sessions/events/facts/show/gated-show/qsr1 passed with zero unexpected warnings
npm test -- --maxWorkers=4 99 files, 1435/1435 passed
npm run harness:generated passed; no generated drift
npm run harness:test 17 files, 156/156 passed
npm run harness-ui:test 3 files, 29/29 passed
npm run harness-studio:test 18 files, 121/121 passed
npm run pack:verify passed; npm 548 entries, runtime zip 577 entries
Documentation link graph 6/6 passed
git diff --check upstream/main...HEAD passed

Manual evidence:

  • The deterministic RED rejected legal origin: "default" with DSH_EVENT_SHAPE_DRIFT before the three-line production fix.
  • Legal default, selection, inferred, and missing origin pass. Null, empty/arbitrary strings, numbers, booleans, objects, arrays, unrelated sibling keys, and invalid preset shape remain rejected.
  • A clean origin-less RC7/RC8-compatible fixture reproduced the already known default-facts direct-user-prompt exposure on exact pre-change Better Harness baseline 996fd3d3045dfe29935fc7948377416712ab2711. Baseline and this branch produced identical sessions/events/facts/show/gated-show results for that oracle. The rc.1 adaptation introduces no new privacy regression; the separate baseline defect remains unresolved and outside this PR.
  • The real rc.1 artifact naturally contained one legal origin: "default"; no origin field or derived claim appeared in normalized events, facts, or public analytics.

Risk and Recovery

  • Compatibility and cross-platform impact: additive only within the pinned DSH event owner; retained RC7/RC8, strict drift, path, framing, and shared provider suites pass.
  • Package, plugin, schema, or generated-file impact: no dependency, package surface, capability, plugin, or generated-source change.
  • Rollback: revert the optional enum validation and its focused tests; the prior RC7/RC8 adapter remains intact.
  • Residual risk: default facts can expose the direct-user prompt. This predates the origin patch, is not fixed or hidden here, and must remain a separate privacy effort.

AI Involvement

  • Level: Assisted
  • Human review and validation: the contributor verified the pinned upstream owner, reviewed the RED and minimal diff, inspected structural real-E2E evidence, enforced the baseline privacy comparison, ran the full gate ladder, and retains final responsibility for the MIT-licensed contribution.

Checklist

  • I followed AGENTS.md, CONTRIBUTING.md, and the relevant canonical-owner guidance.
  • The change is focused and does not include unrelated local or generated state.
  • Tests and documentation match the behavior actually delivered.
  • Markdown links were checked when documentation changed.
  • Cross-platform behavior was considered for Windows, macOS, and Linux.
  • Package/runtime verification was run when shipped runtime files were involved.
  • User-facing or compatibility changes are recorded in CHANGELOG.md — explicitly excluded by the accepted Story [Feature]: Add partial DeepSeek Harness session-evidence adapter #93 follow-up scope.
  • I have the right to contribute this work under the repository's MIT License.

Cobb04 and others added 4 commits August 21, 2026 16:45
Extend Story QoderAI#93 through docs/specs/2026-08-18-93-deepseek-harness-session-evidence.md after the published 0.1.1-rc.1 real E2E completed successfully.

Better Harness fail-closed validation detects one additive permission/preset schema drift. The spec defines strict optional-origin qualification, RED-to-GREEN evidence, public-path privacy requalification, and rollback before implementation.

Validation: Spec Preparation and specification review passed; doc-link graph tests passed 6/6; git diff --check passed.

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Add Story QoderAI#93 RED coverage for AC-12 through AC-14 using docs/specs/2026-08-18-93-deepseek-harness-session-evidence.md.

The public discovery path currently rejects the legal default origin with DSH_EVENT_SHAPE_DRIFT, while the matrix locks the three legal enum values, legacy omission, invalid types and values, unknown siblings, preset typing, and validation-only output.

RED: npx vitest run test/sessions/session-analysis-dsh-provider.test.mjs -t "DSH discovery accepts the pinned rc1 permission preset origin".

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Implement Story QoderAI#93 AC-12 through AC-14 from docs/specs/2026-08-18-93-deepseek-harness-session-evidence.md by extending only the DSH permission/preset exact-shape validator.

The optional field accepts default, selection, or inferred while legacy omission remains valid; invalid values, types, and unrelated keys continue to fail closed, and normalization projects no new semantics.

Validated with the original RED, the exhaustive origin matrix, 22 provider tests, and 97 focused DSH tests.

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
An isolated origin-less baseline reproduction at upstream/main proves the known default-facts direct-user-prompt exposure predates the optional origin validator. Clarify AC-15 to require no new privacy regression while keeping that defect explicit, unresolved, and outside this compatibility follow-up.

Updates Story QoderAI#93 using docs/specs/2026-08-18-93-deepseek-harness-session-evidence.md. The correction was reviewed in Spec Preparation mode and the documentation link graph passed 6/6.

Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
@phodal
phodal merged commit 0a97b6d into QoderAI:main Aug 21, 2026
4 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.

2 participants