fix: stop the facet preset naming a prompt variable the harness dropped
The preset's persona row copied the deployment's suffix, "Your working directory
is {{cwd}}". The harness substitutes only registered prompt variables and throws
on an unregistered one during prompt assembly — so when a harness release stopped
registering `cwd` (only `provider` and `model` remain), every session on this
preset failed its first turn with
unknown prompt variable "{{cwd}}" in section "deployment:persona-suffix"
and chat was dead rather than degraded. The row now carries the prefix only.
The folder is stated where it can follow the session instead: the facet binding
already names the facet, and now names the session folder as well when the two
differ — which is every conversation that started higher up and was narrowed, and
exactly the case where relative tool paths need saying out loud.
`test/presets.test.js` makes this class of failure impossible to reintroduce
silently: it scans every shipped preset for a variable reference and requires the
name to be one the harness registers, and holds this bundle's own rule and
binding text to no references at all. Restoring the old suffix fails it.
This commit is contained in:
1 parent
c49acfdb2c
commit
4bc4296494
6 files changed
+131
-12
No files matched your search
+17
-5
@@ -1,21 +1,27 @@
|
||||
# Agent preset facet: one `@deepseek-ai/dsh-agent-preset` declaration inserted
|
||||
# after the web patch.
|
||||
#
|
||||
# The composition is `standard` with two changes, and this file is the only place
|
||||
# either of them is decided:
|
||||
# The composition is `standard` with three changes, and this file is the only
|
||||
# place any of them is decided:
|
||||
#
|
||||
# * compaction is configured (see the `compaction` row below) so the pressure
|
||||
# trigger is a budget rather than a formality. The shipped ratio is 0.80 of a
|
||||
# 1,000,000-token window, i.e. 800k, and on this deployment nothing has ever
|
||||
# come within 1.5% of it — compaction had never once run;
|
||||
#
|
||||
# * `facet-guard` is mounted, which confines the session to its own folder.
|
||||
# * `facet-guard` is mounted, which confines the session to its own folder;
|
||||
#
|
||||
# * the persona row carries no suffix. The shipped one states the working
|
||||
# directory through a prompt variable the harness no longer registers, and
|
||||
# an unregistered variable fails the whole turn — see the note on that row.
|
||||
#
|
||||
# Everything else is copied verbatim from the shipped `standard` patch, and that
|
||||
# is deliberate: a preset declaration replaces the whole plugin list rather than
|
||||
# merging into it, so a clone that drifts from the original silently loses
|
||||
# whatever it drifted past. When the harness next changes `standard`, re-copy
|
||||
# this file and re-apply the two changes — do not hand-patch around it.
|
||||
# this file and re-apply the three changes — do not hand-patch around it. The
|
||||
# persona row must be re-checked by hand: re-copying it from `standard` restores
|
||||
# the suffix, and the harness's variable set is what decides whether it composes.
|
||||
- insert:
|
||||
- id: preset-facet
|
||||
name: '@deepseek-ai/dsh-agent-preset'
|
||||
@@ -25,10 +31,16 @@
|
||||
description: One module of the system, not all of it — the session's own folder, plus the files you grant.
|
||||
order: 5
|
||||
plugins:
|
||||
# No suffix. It used to state the working directory through the `cwd`
|
||||
# prompt variable, which the harness does not register — and an unknown
|
||||
# variable is not rendered as text: assembly throws and the whole turn
|
||||
# fails with it. Only `provider` and `model` are registered now, so the
|
||||
# prefix keeps its model reference and the folder is stated per session
|
||||
# by `facet-guard`'s runtime binding instead, which follows the user
|
||||
# when they narrow it.
|
||||
- id: persona
|
||||
name: '@deepseek-ai/dsh-persona'
|
||||
config:
|
||||
suffix: Your working directory is {{cwd}}.
|
||||
prefix: You are a coding agent powered by the {{model}} model.
|
||||
- id: agent-instructions
|
||||
name: '@deepseek-ai/dsh-agent-instructions'
|
||||
|
||||
@@ -11,13 +11,17 @@
|
||||
# It is deliberately not applied for you, and the reason is a real hazard rather
|
||||
# than caution: a preset declaration replaces the whole plugin list, never merges
|
||||
# into it, so this file is a frozen copy of the shipped `standard` composition
|
||||
# plus one change. When the harness next updates `standard` — a new tool, a
|
||||
# plus two changes. When the harness next updates `standard` — a new tool, a
|
||||
# renamed row — this copy will not follow it, and the sessions on this preset
|
||||
# will silently lose whatever was added. Use it if you are prepared to re-copy
|
||||
# and re-apply when that happens; otherwise take the compaction settings into
|
||||
# whichever preset you actually run.
|
||||
#
|
||||
# The only change from the shipped file is the `compaction-basic` row's config.
|
||||
# The two changes from the shipped file are the `compaction-basic` row's config,
|
||||
# and the persona row's missing suffix: the shipped one names the working
|
||||
# directory with a prompt variable the harness no longer registers, and an
|
||||
# unregistered variable fails the whole turn instead of rendering. Re-copying
|
||||
# this file from a newer `standard` reintroduces that suffix — re-apply both.
|
||||
- insert:
|
||||
- id: preset-standard
|
||||
name: '@deepseek-ai/dsh-agent-preset'
|
||||
@@ -25,10 +29,15 @@
|
||||
id: standard
|
||||
order: 1
|
||||
plugins:
|
||||
# No suffix, for the reason in `facet.patch.yml`: the harness registers
|
||||
# only `provider` and `model` as prompt variables, and an unregistered
|
||||
# one now throws instead of rendering. Nothing in this preset states the
|
||||
# session's working directory any more — a static prompt template cannot
|
||||
# name a folder that changes per session, so a deployment that needs it
|
||||
# belongs in the runtime context rather than here.
|
||||
- id: persona
|
||||
name: '@deepseek-ai/dsh-persona'
|
||||
config:
|
||||
suffix: Your working directory is {{cwd}}.
|
||||
prefix: You are a coding agent powered by the {{model}} model.
|
||||
- id: agent-instructions
|
||||
name: '@deepseek-ai/dsh-agent-instructions'
|
||||
|
||||
Reference in new issue
Block a user