track: 新增 OpenWork / Orca / Maka 三项目,样本达到 4 个
样本 - openwork (different-ai/openwork) 23.2k★ 能力分发层,DCO + evals + worlds - orca (stablyai/orca) 58.8k★ 并行编排外壳,5000 issue 实为团队自开任务板 - maka (apache/maka) 4.4k★ 执行记录层,Apache 孵化但无正式 release 档案 - 三份五维档案填完,risk.claim_vs_reality 均已核实到证据 - ipollowork 象限坐标从占位 9/9/9/9 校准为 8/7/7/7(与新样本同一标尺) 文章 - 新增横评文《四个 Agent 工作台的路线分野:把「多引擎中立」拆开看》(emlog id=99) - 总纲文回填四项目矩阵 + 双视图象限图 (emlog id=98) 镜像 - gitinbox/maka 已推送(public,source-only 快照 12 MB) - openwork(291MB) / orca(671MB) 受 50KB/s 带宽约束,档案标 mode: pending 规则 - license-tiers.yaml 新增「目录切分许可」降级流程(OpenWork 判例: 排除 ee/ 后为纯 MIT → public,完整镜像 → private) - registry.yaml openwork 可见性改 public + mirror_excludes: ["ee/"] 脚本修复 - _common.py 新增 upsert_block:手工整块覆盖 ecosystem 删掉 metrics 时能自愈 - mirror_sync.sh:SOURCE_ONLY 未初始化(set -u 下偶发炸); 浅仓推送被服务端拒绝 → 自动 --unshallow,失败降级快照; 量体积前先 repack(此前新 commit 全是 loose object,恒打印 0 MB) - build_matrix.py:成熟度长文本移出表格(新增 maturity_level 短标签); 象限图标签靠右时翻转到左侧防溢出;SVG 加 max-width 防窄屏溢出; 文章索引改为自动生成(原先手抄,横评文发了索引里却没有) - publish_emlog.py:ID 回写按「有无同名档案」分流, 00-* 跨项目文章落到 articles/<id>.meta.yaml(此前 ID 无处可写)
This commit is contained in:
@@ -167,6 +167,52 @@ def update_block(text: str, block_key: str, values: dict, indent: int | None = N
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def upsert_block(
|
||||
text: str, block_key: str, values: dict, parent: str, indent: int | None = None
|
||||
) -> str:
|
||||
"""update_block 的容错版:块不存在时,在 parent 块末尾**新建**它。
|
||||
|
||||
为什么需要这个:手工补完档案时习惯整块替换(ecosystem、business 等),
|
||||
一不留神就会把块内的子块(如 ecosystem.metrics)一起覆盖掉。
|
||||
update_block 遇到块缺失只会抛 ValueError,被上层 catch 成一条警告,
|
||||
表现是「指标栏静默变空」——很难察觉,等发现时原始数据已经没了。
|
||||
有了 upsert,这类误删能自动长回来。
|
||||
"""
|
||||
try:
|
||||
return update_block(text, block_key, values, indent)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
lines = text.split("\n")
|
||||
pat = re.compile(rf"^(\s*){re.escape(parent)}:\s*$")
|
||||
pstart = None
|
||||
pbase = 0
|
||||
for i, ln in enumerate(lines):
|
||||
m = pat.match(ln)
|
||||
if m:
|
||||
pstart, pbase = i, len(m.group(1))
|
||||
break
|
||||
if pstart is None:
|
||||
raise ValueError(f"未找到父块 `{parent}:`,无法新建 `{block_key}:`")
|
||||
|
||||
pend = len(lines)
|
||||
for j in range(pstart + 1, len(lines)):
|
||||
ln = lines[j]
|
||||
if not ln.strip() or ln.lstrip().startswith("#"):
|
||||
continue
|
||||
if len(ln) - len(ln.lstrip()) <= pbase:
|
||||
pend = j
|
||||
break
|
||||
|
||||
child = pbase + 2
|
||||
grand = child + 2
|
||||
new = [f"{' ' * child}{block_key}:"] + [
|
||||
f"{' ' * grand}{k}: {_fmt(v)}" for k, v in values.items()
|
||||
]
|
||||
lines[pend:pend] = new
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- 快照
|
||||
def snapshot_path(pid: str) -> Path:
|
||||
return SNAPSHOTS / f"{pid}.jsonl"
|
||||
|
||||
Reference in New Issue
Block a user