create-task.sh templating: name/description text containing a frontmatter key substring corrupts the file
还没有人认领这个 Issue。
评估
调研方向
从 agents/task-create/create-task.sh 的第 495–510 行附近开始,检查 Python 模板处理代码块及其替换逻辑。检查相对于 frontmatter 字段替换,name 和 description 是如何插入的;使用提供的 owner:human 或 workflow_type: 示例进行复现。完成的标准是调用方文本得到保留,必需的 frontmatter 字段已填充,并且任务文件通过其 schema 验证。
由索引模型根据 Issue 内容生成。
描述
Context
- Framework version: 1.6.768
- Project: 1409-sprind (shared-tooling mode)
- Reported: 2026-09-21T12:06:04Z
Description
Symptom
agents/task-create/create-task.sh can silently write a schema-invalid task file (required fields blank) and silently corrupt the caller-supplied name/description text, with no error raised, when the name or description happens to contain certain substrings.
Root cause
Around line 495-510, the Python templating block runs a sequence of t.replace(old, new, 1) calls in this order:
t = t.replace('name:', 'name: "' + name... , 1)
t = t.replace('description: >', 'description: >\n' + indent_block(desc), 1)
t = t.replace('status: captured', 'status: ' + e['TC_STATUS'])
t = t.replace('workflow_type:', 'workflow_type: ' + e['TC_WORKFLOW_TYPE'], 1)
t = t.replace('owner:', 'owner: ' + e['TC_OWNER'], 1)
t = t.replace('horizon: now', 'horizon: ' + e['TC_HORIZON'])
t = t.replace('tags: []', 'tags: ' + e['TC_TAGS_YAML'])
t = t.replace('related_tasks: []', 'related_tasks: ' + e['TC_RELATED_YAML'])
...
The name and description are spliced into t first. The subsequent replace(..., 1) calls for workflow_type:, owner:, tags: [], related_tasks: [], horizon: now, created:, last_update: all match the first literal occurrence anywhere in t — not the frontmatter key specifically. Since t now contains the caller's free-text name/description before the real frontmatter lines further down, any of those literal substrings appearing inside the caller-supplied text is matched instead of the intended frontmatter line.
Reproduction (both observed in one session against a real fw task create call)
--namecontaining the literal textowner:human(as a natural-language description of an ownership condition) → written file: thename:frontmatter field reads"...owner: agenthuman..."(the stringagentwas spliced into the middle of the caller's own text), and the realowner:frontmatter line was left blank (a required field).--descriptioncontaining the literal textworkflow_type:→ written file: the description text is corrupted withworkflow_type: buildspliced in mid-sentence, and the realworkflow_type:frontmatter line was left blank (a required field).
Both corrupted files passed task creation with no warning or error — the schema-required fields being blank went undetected until a later gate (fw bvp estimate, in this case) refused to operate on the task.
Why it matters
This is a data-integrity bug in the framework's own primary task-creation entrypoint: required fields can end up silently blank, and free-text content the caller explicitly wrote is silently mangled, with zero error signal. Any task whose subject matter is about frontmatter fields (which is common for meta/tooling tasks, audit findings about the task schema itself, etc.) is at risk of triggering this.
Suggested fix
Anchor each frontmatter-field replace to the actual frontmatter line rather than a bare substring — e.g. a re.sub(r'^workflow_type:$', ..., t, count=1, flags=re.MULTILINE) (matching the empty-value template line specifically) instead of str.replace('workflow_type:', ..., 1). Alternatively, perform all frontmatter-field substitutions before splicing in the caller-supplied name/description text, so free text can never be a match target.
Scope note
Filed from a downstream project using .agentic-framework/ in shared-tooling (vendored, read-only) mode.
Reported via fw upstream report from field installation
- 主要语言
- Shell
- 星标
- 16
- 派生
- 6
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DimitriGeelen/agentic-engineering-framework 的其他 Issue
-
area:context bug severity:medium status:received triaged
难度 2/5 1-3 小时 新手友好度 82/100
DimitriGeelen/agentic-engineering-framework#113 · 2 条评论 ·
-
area:watchtower bug severity:medium status:received triaged
难度 2/5 1-3 小时 新手友好度 68/100
DimitriGeelen/agentic-engineering-framework#110 · 2 条评论 ·
-
area:fabric bug severity:medium status:received triaged
难度 2/5 1-3 小时 新手友好度 69/100
DimitriGeelen/agentic-engineering-framework#109 · 2 条评论 ·
-
area:fabric bug severity:medium status:received triaged
难度 2/5 1-3 小时 新手友好度 72/100
DimitriGeelen/agentic-engineering-framework#108 · 2 条评论 ·
-
area:tasks bug severity:high status:received triaged
难度 2/5 1-3 小时 新手友好度 76/100
DimitriGeelen/agentic-engineering-framework#107 · 2 条评论 ·
查看 DimitriGeelen/agentic-engineering-framework 的全部 Issue
相似的 Issue
-
documentation good first issue
难度 1/5 1 小时以内 新手友好度 85/100
ysb3996-blip/oops#51 ·
维护者通常 1 天内回复
-
luaebpf: the by-example page's intro names two outcomes of a lowering and omits the stop with the default verdict可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭documentation severity: low
难度 1/5 1 小时以内 新手友好度 88/100
luainkernel/lunatik#2231 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
dataiku/kiji-proxy#668 ·
维护者通常 2 天内回复
-
diagnostics good first issue testing
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
Remove leftover Cloud66 custom_web process from Procfile可能已有人在做 @ShahadatTest 今天认领。 未关闭Difficulty: Easy Good First Issue
难度 1/5 1 小时以内 新手友好度 88/100
rubyforgood/casa#7330 · 1 条评论 ·
维护者通常 1 天内回复