Repository navigation
Conversation
|
Speaking as Kun's firstmate: thanks for this, @Azd325. I read tip Diff looks safe (fail-soft local JSONL; no brief text / key; off path writes nothing). Self-rocket on the issue counts as 0 for triage. Warm ask: the body marks live validation inconclusive (stubbed suite only). Could you live-drive one real resolution (clear / off / write-failure) against the product and post evidence, or re-raise through no-mistakes with that? Once live is in, this can be flagged for a captain merge-or-leave call — not auto-merged. |
|
Live evidence on tip
|
|
Speaking as Kun's firstmate: thank you @Azd325 — the live run covers exactly the three scenarios I asked about (clear writes one line with no brief/key, off writes nothing, read-only file keeps stdout/exit unchanged with a single stderr warning). Really appreciated. Nothing else is needed from you right now. Tip |
0121aa9 to
8951d6c
Compare
[Low impact] The PR appears safe to merge; no blocking issue remains. Reviews (4) · Last reviewed commit: "no-mistakes(review): Honor FM_STATE_OVER..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: thanks @Azd325 for bringing this up to date. I re-checked the new head
This is still a captain decision, waiting on Kun, not on you. Nothing more is needed from you. The contract-class is unchanged: new-default. Once typed dispatch is configured, every resolution is always recorded to |
83afb5f to
1156e04
Compare
….test.sh by adding `|| exit` to all pushd/popd calls. This resolves Lint 2; Behavior portable parallel 1 failed in fm-lint.test.sh, which lints the same file. Dispatch-resolve tests pass locally; the full fm-lint test could not finish here because actionlint is not installed
…n/fm-dispatch-resolve.sh now records rule_when (first 60 chars of the matching rule's `when` from the rules snapshot, or the default text for `default`) when a valid answer exists. Checked the jq expression by hand on sample input. ci-3: tests/fm-dispatch-resolve.test.sh now normalises latency with sed -E 's/latency_ms: [0-9]+/latency_ms: N/' so the rest of stdout is compared in full. The existing late-error test also asserts rule_when. Not verified end to end: the full test file stops locally at 'openai clear status' ('response is not a rule Choice answer'), and it does so on unmodified HEAD too (local jq 1.8.2), so the new assertions and the red-when-changed check did not run
1156e04 to
e03b625
Compare
|
Speaking as Kun's firstmate: thanks @Azd325 for rebasing this. The head is now What I checked: the attestation binds Overlap, for Kun: #8846 (@korabeland) now proposes a per-task copy of the printed answer beside each brief. It serves the same need, so Kun will likely pick one, or keep both on purpose. Nothing is needed from either of you for that. This is still waiting on Kun's decision, not on you. The contract class is unchanged: new-default. Once typed dispatch is configured, every resolution is always recorded. The full suite hasn't run on this head yet. It's queued behind this pass's label budget. |
What Changed
bin/fm-dispatch-resolve.shnow appends one JSON line per resolution that reached the API (clear, ambiguous, escalate, or error after the request) todispatch-resolve.jsonl. The file lives inFM_STATE_OVERRIDE, or else$FM_HOME/state. Each line holds the timestamp, task id, project, status, rule, a 60-characterrule_whenexcerpt, confidence, probabilities, and the fallback rule when one was taken. For clear results it also holdsprofile_source(the rule ordefaultthat supplied the profile) and the chosen profile. It never holds brief text or the API key. The off path and usage errors write nothing. A failed write prints one stderr warning and leaves stdout and the exit code unchanged.profile_sourceandfallback_rule.emit_errorrecords the matched rule and itswhentext when the response was valid.docs/configuration.mdhas a new "Resolution record" section.tests/fm-dispatch-resolve.test.shhas 120 added lines of tests for the record.Risk Assessment
✅ Low: The log reuses the already-resolved TASK_ID, so both reported failures are fixed; the fix round only aligns the log path with FM_STATE_OVERRIDE, and log write failures do not change stdout or the exit code.
Testing
I ran the real
bin/fm-dispatch-resolve.shthrough its test file, against a stubbed model API and quota tool. The file exited 0. The two adversarial task-id cases both recordedpager-fix. The first used anFM_DATA_OVERRIDEoutside a directory named data. The second ran inside the task directory with a relativebrief.md. The same run covered the fallback-rule, profile-source, error-record and write-failure behaviour. I did not drive a Herdr or tmux primary. The decision log is written by a script, so the CLI run covers it.Evidence: dispatch-resolve test transcript
Source: dispatch-resolve test transcript
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
bin/fm-dispatch-resolve.sh:489-RECORD_PATHis fixed to$FM_HOME/state/dispatch-resolve.jsonland ignoresFM_STATE_OVERRIDE. docs/configuration.md:49 defines that variable as the runtime state directory. The peer scripts use${FM_STATE_OVERRIDE:-$FM_HOME/state}, for example bin/fm-spawn.sh:820. Concrete sequence: a home sets bothFM_DATA_OVERRIDEandFM_STATE_OVERRIDE. This is the kind of relocated setup the task-id fix supports. The resolver now records the correct task id, but it creates$FM_HOME/stateand writes the log there. The configured state directory gets no line. If$FM_HOMEis not writable, each resolution prints a warning and the line is lost. Remedy: use${FM_STATE_OVERRIDE:-$FM_HOME/state}at :489. The same path is stated at :121-122 and docs/configuration.md:2304. This needs a decision because both documents name the home'sstate/directory, and the stated intent covers only the task id.bin/fm-dispatch-resolve.sh:122- The header saystaskis "the <id> of data/<id>/brief.md, else null". That describes the removed path regex.tasknow comes fromTASK_ID, which is set only when the brief's physical directory is directly under the configured data root (:250-253). Two cases contradict the header. A brief at<FM_DATA_OVERRIDE>/<id>/brief.mdoutside a directory named data now records its id. Adata/<id>/brief.mdoutside the configured data root now records null. This text is also the--helpoutput. Fix: write<data>/<id>/brief.mdand refer to the<data>definition in the Task record paragraph (:104-105). docs/configuration.md:2305 says only "task id", so it is still correct.tests/fm-dispatch-resolve.test.sh:2164- The late-errorrule_whenassertion has no independent oracle. It computes the expected value with.rules[3].when[0:60], the same index and slice thatemit_erroruses. The public behavior is the documented 60-character excerpt in the record. The rule_4 text has fewer than 60 characters, so neither this assertion nor the literal one at :2099 tests truncation. If either record path stopped truncating (bin/fm-dispatch-resolve.sh:212 orwhen_ofat :806), both assertions would still pass. Fix: give the matched rule awhenlonger than 60 characters, and compare both the clear and late-error records with a hand-written 60-character literal. That literal would reject a full or wrongly sliced rule text.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-dispatch-resolve.test.sh(exit 0, all tests pass, including the task-id cases at lines ~2108-2120)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.