{"record":{"id":"a67b1d0e5681fde4","repo":"deepseek-ai/deepseek-harness","slug":"binname-stage-detail-stack","errorCode":null,"errorMessage":"${binName}: ${stage}: ${detail}${stack}","messagePattern":"\\$\\{binName\\}: \\$\\{stage\\}: \\$\\{detail\\}\\$\\{stack\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/boot/app-boot/src/index.ts","lineNumber":800,"sourceCode":"    await ctx.get('loader')?.await()\n    if (ctx.get('loader') === undefined) return ctx\n    await assertEntriesActivated(ctx, binName)\n    return ctx\n  } catch (cause) {\n    // Root-fiber disposal contains cleanup failures per observer (Cordis\n    // fiber.ts hardening) and a repeated call returns the settled single-shot\n    // result, so this await cannot reject and replace `cause`.\n    await ctx.fiber.dispose()\n    const detail = cause instanceof Error ? cause.message : String(cause)\n    // The transactional Loader wraps a failing entry apply in one message per\n    // tree layer; every layer's message is folded into `detail` above, and the\n    // deepest cause is the plugin's own thrown error, whose stack names the\n    // real failure site — append it so the startup diagnostic preserves the\n    // original activation error instead of only the wrap chain.\n    let deepest: unknown = cause\n    while (deepest instanceof Error && deepest.cause !== undefined) deepest = deepest.cause\n    const stack = deepest instanceof Error && deepest !== cause ? `\\n${deepest.stack ?? deepest.message}` : ''\n    throw new Error(`${binName}: ${stage}: ${detail}${stack}`, { cause })\n  }\n}\n\n/** Prompt-section name for the harness-source location line an app bin adds after boot. */\nexport const HARNESS_SOURCE_SECTION = 'harness:source'\n\n/**\n * Add a global prompt section naming the on-disk harness source checkout while\n * explicitly distinguishing it from the task workspace and current working\n * directory. The self-referential `dsh-tool-cordis` toolset reads and edits this\n * checkout. Call once on the settled boot context ({@link boot}); the section\n * orders just after the harness identity opener (`-100`) and before the deployment\n * persona (`0`). A booted tree with no `systemPrompt` service has no prompt to\n * augment, so this is then a no-op that returns `undefined`. The section is\n * registered against the `systemPrompt` service's fiber, so a dev HMR reload of\n * that plugin drops it until the next boot.\n * @param ctx - the settled boot context whose global system prompt to augment.\n * @param sourceRoot - the absolute path to the harness checkout root.","sourceCodeStart":782,"sourceCodeEnd":818,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/boot/app-boot/src/index.ts#L782-L818","documentation":"Error \"${binName}: ${stage}: ${detail}${stack}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/boot/app-boot/src/index.ts:800 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the stage, detail, and stack, then fix the underlying error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}