amsd-pipeline-shared 0.5.34 → 0.5.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -72,6 +72,26 @@ lane_codeline_set_restore() {
|
|
|
72
72
|
local _prd="${1:-}"
|
|
73
73
|
[ -n "$_prd" ] && [ -f "$_prd" ] && [ -n "${EPAM_PROJECT_CONFIG_DIR:-}" ] || { echo "[prompts] lane: no PRD or project to resolve its codeline's set from" >&2; return 1; }
|
|
74
74
|
local _here; _here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
75
|
+
# A STALE SET IS REFRESHED IN THE LEG (operator, 2026-10-24: "I asked for doctor to have full scope"): a codeline whose recorded set is
|
|
76
|
+
# no longer complete for the current templates has it brought up to date by the pipeline's own builder, in the story's context (the
|
|
77
|
+
# run's own PRD), before the lane restores it — inside the leg, so a failure is the lane's and the doctor's, never a hand-run step.
|
|
78
|
+
# The command is EPAM_PROMPT_REFRESH_CMD when set (as AI_RUNNER_CMD is), else the pipeline's refresh-project-prompts.js.
|
|
79
|
+
local _stale
|
|
80
|
+
_stale=$("${NODE_BIN:-node}" -e '
|
|
81
|
+
const b = require(process.argv[1]);
|
|
82
|
+
const codeline = b.codelineOfPrd(process.argv[3]);
|
|
83
|
+
const r = codeline && b.hasMintedSnapshot({ projectConfigDir: process.argv[2], codeline }) ? b.codelineSetComplete({ projectConfigDir: process.argv[2], codeline }) : { complete: true };
|
|
84
|
+
process.stdout.write(r.complete ? "" : `${codeline}\t${r.reason || ""}`);
|
|
85
|
+
' "${_here}/project-prompt-builder.js" "$EPAM_PROJECT_CONFIG_DIR" "$_prd" 2>/dev/null) || _stale=""
|
|
86
|
+
if [ -n "$_stale" ]; then
|
|
87
|
+
local _scl="${_stale%% *}"
|
|
88
|
+
echo "[prompts] lane: codeline ${_scl}'s recorded set is stale (${_stale#* }) — refreshed now by the pipeline's own builder" >&2
|
|
89
|
+
if ! ${EPAM_PROMPT_REFRESH_CMD:-"${NODE_BIN:-node}" "${_here}/../refresh-project-prompts.js"} --project "$EPAM_PROJECT_CONFIG_DIR" \
|
|
90
|
+
--prd "${EPAM_RUN_PRD:-$_prd}" --codeline "$_scl" --log-dir "${LOG_DIR:-${EPAM_PROJECT_CONFIG_DIR}/logs}/refresh-prompts" >&2; then
|
|
91
|
+
echo "[prompts] lane: codeline ${_scl}'s set could not be refreshed — the lane does not run a stale set" >&2
|
|
92
|
+
return 1
|
|
93
|
+
fi
|
|
94
|
+
fi
|
|
75
95
|
local _out
|
|
76
96
|
_out=$("${NODE_BIN:-node}" -e '
|
|
77
97
|
const b = require(process.argv[1]);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// byte for byte with no call, one whose template moved on is regenerated and reviewed (lib/prompt-build-calls.js, the
|
|
9
9
|
// mint's own generator and reviewer). The builder records the codeline's completion itself.
|
|
10
10
|
//
|
|
11
|
-
// refresh-project-prompts.js --project <project config dir> --prd <run PRD> [--log-dir <dir>] [--stand-in]
|
|
11
|
+
// refresh-project-prompts.js --project <project config dir> --prd <run PRD> [--codeline <id>] [--log-dir <dir>] [--stand-in]
|
|
12
12
|
//
|
|
13
13
|
// The codelines are the PRD's outputDirs, each one's id as the builder files it (codelineFromPrd of a one-codeline PRD).
|
|
14
14
|
// --stand-in: no model is called — the generator answers with the template's own text and the reviewer approves — so
|
|
@@ -54,6 +54,8 @@ async function main() {
|
|
|
54
54
|
const slice = path.join(logDir, `prd.${path.basename(o.path)}.json`);
|
|
55
55
|
fs.writeFileSync(slice, JSON.stringify({ ...prd, project: { ...prd.project, outputDirs: [o], outputDir: o.path } }));
|
|
56
56
|
const codeline = builder.codelineFromPrd(slice);
|
|
57
|
+
// --codeline <id>: only that codeline's set (a lane refreshing its own stale set, lib/prompt-variant.sh lane_codeline_set_restore)
|
|
58
|
+
if (a.codeline && codeline !== a.codeline) continue;
|
|
57
59
|
process.env.EPAM_CODELINE_ID = codeline;
|
|
58
60
|
process.env.EPAM_PROJECT_CONFIG_DIR = projectConfigDir;
|
|
59
61
|
process.env.PRD_FILE = slice;
|
|
@@ -62,7 +64,11 @@ async function main() {
|
|
|
62
64
|
const restored = builder.restoreMinted({ projectConfigDir, codeline });
|
|
63
65
|
if (!restored) { report.push({ codeline, restored, skipped: 'no recorded agents and prompts for this codeline', rebuilt: [], kept: 0 }); continue; }
|
|
64
66
|
const roles = lib('project-roster.js').mintedFromRegistries(projectConfigDir);
|
|
65
|
-
|
|
67
|
+
// THE STORY'S CODELINES — the run's PRD project.outputDirs, which the codeline discovery wrote and the mint reads: each codeline's set
|
|
68
|
+
// is its own, but the context its prompts are made and judged in is the story's, as the mint gives it — given only its own codeline,
|
|
69
|
+
// gotransit's reviewer judged the minted roles' cx-shared claims false 5 of 5 (run 13, 2026-10-24) and the refresh stopped
|
|
70
|
+
const codelines = dirs.map((d) => ({ name: d.codeline || path.basename(d.path), path: d.path }));
|
|
71
|
+
process.stderr.write(`[refresh-project-prompts] ${codeline}: context — codelines ${codelines.map((c) => c.name).join(', ')}\n`);
|
|
66
72
|
const codelineContext = lib('codeline-context.js').buildCodelineContext({
|
|
67
73
|
codelines, factsFile: path.join(projectConfigDir, 'codeline-facts.json'), surveyed: [] });
|
|
68
74
|
const calls = a['stand-in'] ? standInCalls(templatesDir) : (() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amsd-pipeline-shared",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.36",
|
|
4
4
|
"description": "The AMSD pipeline's shared components, one source for the bash pipeline and its Claude workflows: the model-call gateway (llm-handler.sh — retry, ladder, self-heal, cost) and the libraries it runs.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"bin": {
|