Stream native failure manifests during publication
This commit is contained in:
1 parent
72ed779749
commit
5aa7dc7331
5 files changed
+46
-9
No files matched your search
@@ -196,6 +196,10 @@ aux 的三次实际同步串行完成,单次编辑合计168.6–894.3 ms,链
|
|||||||
SHA-256 为 `a0c3b9929508e8bfbb8f33fe177fc662c4eca0cc7d5c41ac52503a39e337ab1b`。
|
SHA-256 为 `a0c3b9929508e8bfbb8f33fe177fc662c4eca0cc7d5c41ac52503a39e337ab1b`。
|
||||||
多文件崩溃恢复和正式界面接入继续推进。
|
多文件崩溃恢复和正式界面接入继续推进。
|
||||||
|
|
||||||
|
大规模错误报告按原 JSON 格式直接写入缓冲暂存文件,再完整同步并按新文件
|
||||||
|
发布。集成测试核对 11 种失败路径,包含原序列化字节、原有报告保护、错误
|
||||||
|
保留及暂存清理。真实 CVPR 大报告的峰值内存还需重新测量。
|
||||||
|
|
||||||
### schema25 主干验收
|
### schema25 主干验收
|
||||||
|
|
||||||
容量、PDF 信息和 JPEG 的合并版本已核对 479 项冻结源码。完整工作区通过
|
容量、PDF 信息和 JPEG 的合并版本已核对 479 项冻结源码。完整工作区通过
|
||||||
|
|||||||
@@ -245,7 +245,8 @@ schema27 候选已接通通用 `\pdfoutline`,复用 PDF catalog 的动作扫
|
|||||||
`target/p3-pdf-outlines/cli-outline-2/receipt.json` 的 SHA-256 为
|
`target/p3-pdf-outlines/cli-outline-2/receipt.json` 的 SHA-256 为
|
||||||
`f392c933c91d99c74865254de5c09869e11cb206f52edb5895ef3d5f58f93cfe`。
|
`f392c933c91d99c74865254de5c09869e11cb206f52edb5895ef3d5f58f93cfe`。
|
||||||
保存的真实 schema23、25、26 格式均被拒绝,保留各自的既有 PDF。完整工作区
|
保存的真实 schema23、25、26 格式均被拒绝,保留各自的既有 PDF。完整工作区
|
||||||
和七份 article 仍在复验。真实 schema27 格式从原版 `pdflatex.ini` 与官方
|
仍在复验。独立真实新格式的七份 article 共 21 轮通过 PDF 与原始布局。
|
||||||
|
真实 schema27 格式从原版 `pdflatex.ini` 与官方
|
||||||
firstaid 构建。10 份参考 PDF 全部生成,原生最终生成 4 份。IEEE 双栏期刊
|
firstaid 构建。10 份参考 PDF 全部生成,原生最终生成 4 份。IEEE 双栏期刊
|
||||||
starter、Springer LNCS 和 IEEE 会议通过冻结的 PDF 容差与最终 aux 对照。
|
starter、Springer LNCS 和 IEEE 会议通过冻结的 PDF 容差与最终 aux 对照。
|
||||||
Springer Nature 第一次完成三轮原生编译,生成 12 页,引用收敛,词序与嵌入字体
|
Springer Nature 第一次完成三轮原生编译,生成 12 页,引用收敛,词序与嵌入字体
|
||||||
@@ -268,7 +269,8 @@ arXiv 和 ACL 同在 microtype 中缺少 `\pdfmatch`。Elsevier 单双栏仍遇
|
|||||||
Springer Nature 末页的偏移可在保留原样前导区、类文件和同字节参考文献的
|
Springer Nature 末页的偏移可在保留原样前导区、类文件和同字节参考文献的
|
||||||
独立单页文档中复现。两端原始断行日志表明,原生给第二条文献的候选空末行
|
独立单页文档中复现。两端原始断行日志表明,原生给第二条文献的候选空末行
|
||||||
计入了 `\parfillskip`,因而多断一行。隔离修复使用段落尾的实际罚分与填充
|
计入了 `\parfillskip`,因而多断一行。隔离修复使用段落尾的实际罚分与填充
|
||||||
节点,仍在回归。末页辅助文件明确只差 hyperref 通过 `\pdflastlink` 登记的
|
节点。段落跟踪和文字重音共 9 项定向测试通过,原样模板仍在复验。
|
||||||
|
末页辅助文件明确只差 hyperref 通过 `\pdflastlink` 登记的
|
||||||
两行。原版对象探针已验证真实链接对象号、废弃盒和复制出页的行为。单页词框
|
两行。原版对象探针已验证真实链接对象号、废弃盒和复制出页的行为。单页词框
|
||||||
报告 SHA-256 为
|
报告 SHA-256 为
|
||||||
`c60c292a7ed150a391fcaa2b076ff3f6acfb1944b436023620bf5819a467b6c6`。
|
`c60c292a7ed150a391fcaa2b076ff3f6acfb1944b436023620bf5819a467b6c6`。
|
||||||
|
|||||||
+14
-6
@@ -403,12 +403,20 @@ impl CompileFailure {
|
|||||||
schema: u32,
|
schema: u32,
|
||||||
failure: &'a CompileFailure,
|
failure: &'a CompileFailure,
|
||||||
}
|
}
|
||||||
let bytes = serde_json::to_vec_pretty(&Report {
|
PreparedOutput::write_with(&destination, |file| {
|
||||||
schema: 1,
|
use std::io::{BufWriter, Write};
|
||||||
failure: self,
|
let mut buffer = BufWriter::new(file);
|
||||||
})
|
serde_json::to_writer_pretty(
|
||||||
.map_err(|e| e.to_string())?;
|
&mut buffer,
|
||||||
PreparedOutput::write(&destination, &bytes)?.commit_new(&destination)
|
&Report {
|
||||||
|
schema: 1,
|
||||||
|
failure: self,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.map_err(|error| error.to_string())?;
|
||||||
|
buffer.flush().map_err(|error| error.to_string())
|
||||||
|
})?
|
||||||
|
.commit_new(&destination)
|
||||||
}
|
}
|
||||||
fn persist_requested(mut self) -> Self {
|
fn persist_requested(mut self) -> Self {
|
||||||
if let Some(path) = &self.request.failure_manifest {
|
if let Some(path) = &self.request.failure_manifest {
|
||||||
|
|||||||
+11
-1
@@ -1855,8 +1855,18 @@ impl PreparedOutput {
|
|||||||
Ok(version)
|
Ok(version)
|
||||||
}
|
}
|
||||||
pub fn write(output: &Path, bytes: &[u8]) -> Result<Self, String> {
|
pub fn write(output: &Path, bytes: &[u8]) -> Result<Self, String> {
|
||||||
|
Self::write_with(output, |file| {
|
||||||
|
file.write_all(bytes).map_err(|error| error.to_string())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn write_with(
|
||||||
|
output: &Path,
|
||||||
|
write: impl FnOnce(&mut File) -> Result<(), String>,
|
||||||
|
) -> Result<Self, String> {
|
||||||
let (prepared, mut file) = Self::create(output)?;
|
let (prepared, mut file) = Self::create(output)?;
|
||||||
let written = file.write_all(bytes).and_then(|()| file.sync_all());
|
let written = write(&mut file)
|
||||||
|
.and_then(|()| file.sync_all().map_err(|error| error.to_string()));
|
||||||
drop(file);
|
drop(file);
|
||||||
written.map_err(|error| format!("stage output {}: {error}", output.display()))?;
|
written.map_err(|error| format!("stage output {}: {error}", output.display()))?;
|
||||||
Ok(prepared)
|
Ok(prepared)
|
||||||
|
|||||||
@@ -1430,7 +1430,20 @@ fn offline_failed_dump_preserves_primary_error_partial_io_and_new_only_failure_r
|
|||||||
p.join("partial.dat")
|
p.join("partial.dat")
|
||||||
);
|
);
|
||||||
assert!(f.evidence_gaps.iter().any(|g| g.contains("bad-report")));
|
assert!(f.evidence_gaps.iter().any(|g| g.contains("bad-report")));
|
||||||
|
#[derive(serde::Serialize)]
|
||||||
|
struct Report<'a> {
|
||||||
|
schema: u32,
|
||||||
|
failure: &'a CompileFailure,
|
||||||
|
}
|
||||||
let report = fs::read(p.join("failure.json")).unwrap();
|
let report = fs::read(p.join("failure.json")).unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
report,
|
||||||
|
serde_json::to_vec_pretty(&Report {
|
||||||
|
schema: 1,
|
||||||
|
failure: &f,
|
||||||
|
})
|
||||||
|
.unwrap()
|
||||||
|
);
|
||||||
let json: serde_json::Value = serde_json::from_slice(&report).unwrap();
|
let json: serde_json::Value = serde_json::from_slice(&report).unwrap();
|
||||||
assert_eq!(json["schema"], 1);
|
assert_eq!(json["schema"], 1);
|
||||||
assert_eq!(json["failure"]["phase"], "Executing");
|
assert_eq!(json["failure"]["phase"], "Executing");
|
||||||
|
|||||||
Reference in new issue
Block a user