Skip to content

DSH rc.8 credentials: reader/rotator contract #13079

Closed

Description

@gHashTag

DSH 0.1.0-rc.8 refuses to load the credentials plugin: the installed dsh-credentials-local expects a flat mapping of references to non-empty strings, and the observed document has the top-level keys records, refs and version. The reader and the rotation writer disagree. This issue asks the key master to agree one contract between them. Refs #13046.

No secret value is in this issue. Only key names and file shapes are quoted.

Observation (2026-11-01, T27 OS shell cell)

  • dsh --profile headless "<read-only errand>" stops at plugin load with credentials-local: the value for "records" in <DSH home>/.credentials.yaml must be a string. Authorization at the model provider was never reached, so no key is shown to be wrong or expired. Status: T27 OS launched DSH (checked); credentials plugin load (refused on format); model access (not checked); expected answer (not received); ACP (not checked).
  • Reader contract, read from the installed plugin (README and lib/index.js, rc.8 in the global install and in the profile-local node_modules): the document is a YAML mapping of credential reference to value "and nothing else"; a non-mapping root, a non-string value or an empty value is a rejection. Config fields: path, dshHome (default $DSH_HOME or ~/.dsh), watch, debounceMs. The inherited process environment wins over the file.
  • Observed document (names only): top-level keys records, refs, version; refs holds five references; records holds three entries with kind and payload; mode 0600, 933 bytes.
  • Known writer: the launchd rotation job (every 60 s) patches refs.<REF> as text, creates version: 1 and refs: on an empty file, keeps every other line, and finds the current key with a regex that assumes the two-space nested layout. It has no code for records. The writer of records is not identified; the rc.8 packages contain no records handling.
  • Why the document must not simply be flattened (derived from reading the rotation script, not run): its next write finds no two-space line, finds no refs: and appends a refs: block, which restores the nested layout within one tick.
  • Consumers: the five references are the names that the web profile patch uses. The headless profile patch is empty and names none of them. Whether the headless profile needs any reference is not established. The web profile includes the same plugin, so a web restart would fail the same way; the web service is not running at the time of writing and nobody restarted it.

Boundary

  • specs/t27os/keys.t27

User Scenarios

  • Given the credentials document has the top-level keys records, refs and version, when dsh --profile headless starts, then the credentials plugin must load instead of exiting 1.
  • Given a compatible store is in place, when the rotation job rewrites its key, then the plugin must still load on the next start.
  • Given the change was wrong, when the key master rolls it back, then no secret value appears in any log or report.

Requirements

  • FR-001: The key master MUST confirm the schema the installed plugin expects against the installed version before any change.
  • FR-002: The key master MUST identify the process that writes records and every process that reads or writes the current layout, and MUST name the references DSH needs for the headless and web profiles.
  • FR-003: The change MUST choose one compatible route and justify it: a separate store for the rotation state, the plugin path setting, or a verified conversion.
  • FR-004: The change MUST include a rollback that does not print a secret value.
  • FR-005: The change MUST show, by observing one rotation cycle, that the next rotation does not restore the incompatible layout.
  • FR-006: The key master MUST signal readiness for one repeat headless run; the signal MUST NOT carry a secret.

Success Criteria

  • One headless run of a read-only errand ends with exit 0 and prints the expected answer token.
  • One rotation cycle of 60 s after the change leaves the document loadable (the repeat run still ends with exit 0).
  • 0 secret values appear in this issue, its comments or the readiness signal.

Activity

  1. gHashTag commented on Nov 1, 2026

    @gHashTag
    CollaboratorAuthor

    Update after reading the sources and one headless attempt (2026-11-02). No credential value, token or raw run output is included here.

    The premise of this issue changes. The store layout is not what blocks the source launcher.

    1. Two DSH builds share one home ~/.dsh. The globally installed CLI dsh is @deepseek-ai/dsh 0.1.0-rc.8; its credentials plugin accepts only a flat ref-to-string map, so it rejects the nested version / refs / records layout with the records error. The source tree ~/deepseek-harness (0.2.2-alpha.2), which the web launchd job runs, reads the nested layout. The rotator ~/bin/dsh-zai-rotate.mjs patches refs.DSH_ZAI_KEY in that nested layout and is compatible with it. So the store is correct for 0.2.x and the rc.8 CLI is the odd one out.
    2. One headless request through the source launcher (--profile headless) passed plugin load and the store read: no records error.
    3. That request still did not reach a model. It exited 1, the marker DSH_T27OS_OK was not received, and the exit line was withheld because a secret-screen matched it. The likely stage is the provider/model route: ~/.dsh/profiles/headless/cordis.patch.yml is an empty array and the headless profile bundles only dsh-base and dsh-headless, while the web profile patch carries the zai-pool route. This is read from the profile files; the exit line itself was not read.
    4. Separate finding for the web interface on 127.0.0.1:3080: with restored t27 sessions, the workspace-changes plugin (mounted only by the web-app bundle) wrote about 4.8 GiB of dsh-workspace-changes-* temp trees in about 2.5 minutes with no model turn; a graceful stop disposed them. No config knob in that plugin bounds the size.

    What is needed from whoever accepts this issue (nothing here was changed by me):

    • Say which launcher is canonical for T27OS: the rc.8 global CLI (needs a flat store) or the source tree (works with the current store).
    • Decide whether the headless profile gets the same model route as the web profile, or the check runs through the web profile.
    • Decide how the web interface may be relaunched without the temp-tree growth (disable workspace-changes, or restrict session working directories).

    Assignees: none. Acceptance by a named executor is still pending.

  2. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec created: specs/t27os/dsh_rc8_credentials.t27 (typecheck OK, 2 tests pass).

  3. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.

  4. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Specs created for M10 milestone. Typecheck OK.

  5. gHashTag commented on Nov 18, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 spec was created but no production implementation, integration test, or CI verification exists. This issue remains open until the target component implements the specified behavior and evidence is provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions