合入小壹 R4 最新集成基线
This commit is contained in:
commit
871d7c0f2b
@ -44,7 +44,8 @@ export async function createPhotoCraftExtensions(host, existing = [], {
|
||||
noExtensions: true, noThemes: true, noContextFiles: true,
|
||||
additionalExtensionPaths: includeGoal ? [path.join(goalPackage, '.pi', 'extensions', 'pi-goal', 'index.ts')] : [],
|
||||
additionalSkillPaths: includeGoal ? [path.join(goalPackage, 'skills'), productionSkills] : [],
|
||||
noSkills: !includeProjectResources, noPromptTemplates: !includeProjectResources,
|
||||
noSkills: includeGoal || !includeProjectResources,
|
||||
noPromptTemplates: !includeProjectResources,
|
||||
systemPromptOverride: () => systemPrompt,
|
||||
appendSystemPrompt: [],
|
||||
extensionsOverride: result => ({...result, extensions:[...existing, ...result.extensions]}),
|
||||
|
||||
@ -104,9 +104,7 @@ export async function callProductionTool(host, name, args, signal) {
|
||||
}
|
||||
if (name==='finish_production' && args.revision===undefined) {
|
||||
if (args.scope!=='all') throw Error('请提交已复核的画布修订');
|
||||
const operations=host.productionOperations;
|
||||
await closeProductionTurn(host);
|
||||
const screenReviewRevisions=(await operations)?.screenReviewRevisions?.();
|
||||
const screenReviewRevisions=(await host.productionOperations)?.screenReviewRevisions?.();
|
||||
return submitProduction(host,{scope:'all',...(screenReviewRevisions?.length?{screenReviewRevisions}:null)},signal);
|
||||
}
|
||||
if (!goal.outputId) {
|
||||
@ -114,8 +112,10 @@ export async function callProductionTool(host, name, args, signal) {
|
||||
if (name==='plan_production') {
|
||||
const {id,name,version,productionRoute}=goal.template??{};
|
||||
const {product,dimensions,note}=host.productEvidence??{};
|
||||
const knowledge=productionKnowledge(host.productionSkills?.knowledge??host.knowledgeContext);
|
||||
return {requestedOutputs:goal.requestedOutputs,pendingOutputs:goal.pendingOutputs,
|
||||
workingOutput:null,template:{id,name,version,productionRoute},product:{...product,dimensions,note}};
|
||||
workingOutput:null,template:{id,name,version,productionRoute},product:{...product,dimensions,note},
|
||||
knowledgeFiles:knowledge.files};
|
||||
}
|
||||
if (name==='read_production_knowledge') {
|
||||
const knowledge=productionKnowledge(host.productionSkills?.knowledge??host.knowledgeContext);
|
||||
|
||||
@ -6,7 +6,7 @@ fields.add('screenCount');
|
||||
fields.add('persistence');
|
||||
for (const name of ['afterRevision','overlayLayers','overlayNote','mapped','bounds','overlapsSlots']) fields.add(name);
|
||||
for (const name of ['template','enterprise','releaseId','templateVersion']) fields.add(name);
|
||||
for (const name of ['canvasFirst','subject','productVariantId','variantId','variantLabel','candidateId','parentCandidateId','adoptedCandidateId','pageId','nativeLayerId','taskId','previewId','operationId','operation','workflow']) fields.add(name);
|
||||
for (const name of ['canvasFirst','subject','productVariantId','variantId','variantLabel','candidateId','parentCandidateId','adoptedCandidateId','pageId','nativeLayerId','taskId','previewId','operationId','operation','workflow','manuallyEdited','writeBlockReason']) fields.add(name);
|
||||
|
||||
/** A small data-only view. Pixels, paths, model prompts and private task bodies
|
||||
* never enter the transcript, even if a future native reply includes them. */
|
||||
|
||||
@ -143,9 +143,10 @@ export async function executeWorkflow(host, args, signal, { timeoutMs, pause = d
|
||||
scope.writesBlocked = true;
|
||||
scope.stopReason = message;
|
||||
}
|
||||
const reason = result.error.reason ?? result.error.code;
|
||||
await host.store.appendEvent({type:'workflow_operation_not_dispatched',run,documentId,operationId,baseRevision:result.baseRevision,
|
||||
intent:args.intent,slotId:args.slotId,productVariantId:args.productVariantId,code:result.error.code,message});
|
||||
throw new BridgeError(message,'local_precondition_failed');
|
||||
intent:args.intent,slotId:args.slotId,productVariantId:args.productVariantId,code:result.error.code,reason,message});
|
||||
throw new BridgeError(message,reason);
|
||||
}
|
||||
const phases=observedOriginal?receiptPhases:['submitted'];
|
||||
if (result?.operationId !== operationId || !phases.includes(result.phase)) throw Error('工作流操作提交状态无效,原操作需核查;不会重发');
|
||||
@ -175,6 +176,9 @@ export async function executeWorkflow(host, args, signal, { timeoutMs, pause = d
|
||||
scope.retain({kind:'workflow',operationId,run,documentId,identity,epoch});
|
||||
return {operation:{phase:'unknown',operationId,candidateId:result.candidateId}};
|
||||
}
|
||||
if (result.phase === 'failed' && result.writeBlockReason) {
|
||||
throw new BridgeError(workflowResult(result).message,result.writeBlockReason,{dispatched:true});
|
||||
}
|
||||
if (result.phase !== 'complete') throw Error(workflowResult(result).message || (result.phase === 'failed' ? '原工作流操作失败,请核查结果;不会重发' : '原工作流操作结果未知,请核查原请求;不会重发'));
|
||||
const operation = workflowResult({
|
||||
...result, intent: args.intent, outputId: args.outputId, slotId: args.slotId, productVariantId: args.productVariantId,
|
||||
|
||||
@ -1227,7 +1227,7 @@ test('reading a fresh production goal never starts the strategy, image workers,
|
||||
assert.equal((await host.productionOperations).active,0);
|
||||
});
|
||||
|
||||
test('production loads the project’s native skill and prompt template', async t => {
|
||||
test('production loads project prompt templates without discovering project skills', async t => {
|
||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'pi-recovery-project-resources-'));
|
||||
t.after(() => cleanup(dir));
|
||||
const cwd = path.join(dir, 'workspace');
|
||||
@ -1240,7 +1240,7 @@ test('production loads the project’s native skill and prompt template', async
|
||||
await fs.writeFile(path.join(promptDir, 'fixture-copy.md'),
|
||||
'---\ndescription: Write a fixture headline.\n---\nDescribe the work surface.');
|
||||
const {resourceLoader} = await createPhotoCraftExtensions({workingDirectory: cwd, store: {dir}}, [], {includeGoal: true});
|
||||
assert.ok(resourceLoader.getSkills().skills.some(skill => skill.name === 'desk-copy'));
|
||||
assert.ok(!resourceLoader.getSkills().skills.some(skill => skill.name === 'desk-copy'));
|
||||
assert.equal(resourceLoader.getPrompts().prompts.find(prompt => prompt.name === 'fixture-copy')?.content,
|
||||
'Describe the work surface.');
|
||||
});
|
||||
|
||||
@ -96,12 +96,15 @@ test('Pi production and its worker read the same locked Skill and its relative r
|
||||
productEvidence:{accountScope:id.scope,project:id.project,documentId,brief:{brandName:'试验品牌',categoryName:'灯具'}}})};
|
||||
let main=0,worker=0,serial=0;
|
||||
const reads=new Map();
|
||||
const skillLists=new Map();
|
||||
const transport={info:info(id.scope),stream(_model,context){
|
||||
const system=getCurrentSystemPrompt(context.messages);
|
||||
assert.match(system,/<name>lighting<\/name>/);
|
||||
assert.doesNotMatch(system,/PINNED_FINISH|Use the \[fixture notes\]/);
|
||||
const location=system.match(/<name>lighting<\/name>[\s\S]*?<location>([^<]*SKILL\.md)<\/location>/u)[1];
|
||||
const child=system.includes('完成主代理委托的图位');
|
||||
const skillList=system.match(/<available_skills>[\s\S]*?<\/available_skills>/u)[0];
|
||||
skillLists.set(child?'worker':'main',[...skillList.matchAll(/<name>([^<]+)<\/name>/gu)].map(match=>match[1]).sort());
|
||||
const steps=child?[
|
||||
['read',{path:location}],
|
||||
['read',{path:path.join(path.dirname(location),'references','finish.md')}],
|
||||
@ -120,6 +123,24 @@ test('Pi production and its worker read the same locked Skill and its relative r
|
||||
return step?stream([{type:'toolCall',name:step[0],id:'skill-'+(++serial),arguments:step[1]}]):
|
||||
stream([{type:'text',text:'本轮结束。'}]);
|
||||
}};
|
||||
const home=path.join(dir,'home');
|
||||
for(const [base,name] of [
|
||||
[path.join(home,'.agents','skills'),'personal-skill'],
|
||||
[path.join(store.dir,'skills'),'global-skill'],
|
||||
[path.join(store.dir,'workspace','.pi','skills'),'workspace-skill'],
|
||||
]){
|
||||
const skillDir=path.join(base,name);
|
||||
await fs.mkdir(skillDir,{recursive:true});
|
||||
await fs.writeFile(path.join(skillDir,'SKILL.md'),`---\nname: ${name}\ndescription: An unbound test skill.\n---\nFixture only.`);
|
||||
}
|
||||
for(const key of ['HOME','USERPROFILE']){
|
||||
const previous=process.env[key];
|
||||
process.env[key]=home;
|
||||
t.after(()=>{
|
||||
if(previous===undefined) delete process.env[key];
|
||||
else process.env[key]=previous;
|
||||
});
|
||||
}
|
||||
const host=await DetailPiAgent.open({store,canvas,transport,documentId,productionGoal:{outputId:'detail',variantId,workspaceId:randomUUID(),requestedOutputs:[{outputId:'detail',variantId}],skillRunDeadline:runDeadline}});
|
||||
let loads=0;
|
||||
const documents=[];
|
||||
@ -133,6 +154,10 @@ test('Pi production and its worker read the same locked Skill and its relative r
|
||||
host.enterpriseContext.load=async()=>{loads++;return knowledge;};
|
||||
try {
|
||||
assert.equal((await host.prompt('制作详情页')).production.complete,true);
|
||||
await t.test('production prompts only list bound and bundled skills',()=>{
|
||||
const expected=['lighting','pi-goal-writer','product-image-sources'];
|
||||
assert.deepEqual(Object.fromEntries(skillLists),{main:expected,worker:expected});
|
||||
});
|
||||
const context=await host.modelContext({}, {loadKnowledge:true});
|
||||
assert.deepEqual(context.enterpriseKnowledge.sources.map(row=>row.revision),['r4','r7']);
|
||||
assert.equal(loads,1,'read-only context uses the original locked selection');
|
||||
|
||||
@ -35,6 +35,13 @@ test('an identity-bound local rejection stops the turn without an unknown image
|
||||
assert.equal(x.calls.length,1);
|
||||
});
|
||||
|
||||
test('preserves a new layer lock as the reason a write was not dispatched',async()=>{
|
||||
const x = fixture(receipt=>({...receipt,error:{...receipt.error,reason:'layer_newly_locked'}}));
|
||||
await assert.rejects(executeWorkflow(x.host,args),{category:'layer_newly_locked',dispatched:false});
|
||||
assert.equal(x.events[0].code,'local_precondition_failed');
|
||||
assert.equal(x.events[0].reason,'layer_newly_locked');
|
||||
});
|
||||
|
||||
test('a malformed or foreign rejection cannot clear a possibly dispatched operation',async()=>{
|
||||
for (const [key,value] of Object.entries({operationId:'other',run:'other',documentId:8,baseRevision:-1,
|
||||
accountId:'other',origin:'https://other.test',projectLocalId:'other',accepted:true,dispatched:true,
|
||||
|
||||
@ -138,7 +138,7 @@ macro_rules! spec {
|
||||
}
|
||||
|
||||
mod bounded;
|
||||
pub use bounded::{BoundedSource, SourceSnapshot, SourceTicket, freeze_source, prepare_bounded_source, refresh_layer_with_bounded_source, replace_contents_bounded, replace_instance_bounded_fit, replace_instance_bytes, replace_instance_bytes_fit, update_instance_source_bytes};
|
||||
pub use bounded::{BoundedSource, SourceSnapshot, SourceTicket, freeze_source, prepare_bounded_source, refresh_layer_with_bounded_source, replace_contents_bounded, replace_instance_bounded_fit, replace_instance_bytes, replace_instance_bytes_fit, replace_template_instance_bounded_fit, update_instance_source_bytes};
|
||||
mod contents;
|
||||
mod filters;
|
||||
mod placing;
|
||||
|
||||
@ -324,6 +324,13 @@ pub fn replace_instance_bounded_fit(s: &mut Session, id: LayerId, original: Opti
|
||||
let doc = &s.active().ok_or(EngineError::NoDocument)?.doc;
|
||||
crate::commands::check_pixels_unlocked(doc, id)?;
|
||||
if doc.path_of(id).is_some_and(|path| doc.locks_at(&path).position) { return Err(other("image position is locked")); }
|
||||
replace_template_instance_bounded_fit(s, id, original, candidate, contain)
|
||||
}
|
||||
|
||||
/// Prepare a mapped image replacement after the caller compares live locks
|
||||
/// with the production baseline. Keep the original layer and group locks in place.
|
||||
pub fn replace_template_instance_bounded_fit(s: &mut Session, id: LayerId, original: Option<&BoundedSource>, candidate: &BoundedSource, contain: bool) -> Result<Value> {
|
||||
let doc = &s.active().ok_or(EngineError::NoDocument)?.doc;
|
||||
let old = smart(doc, id)?;
|
||||
if old.warp.is_some() || old.perspective.is_some() { return Err(other("flatten the image's warp before replacing this slot")); }
|
||||
let (nw, nh) = (candidate.document.size.width as f64, candidate.document.size.height as f64);
|
||||
|
||||
@ -766,12 +766,18 @@ pub(crate) fn check_text_unlocked(doc: &Document, id: LayerId) -> Result<()> {
|
||||
|
||||
/// Replace several editable text layers in one document and history update.
|
||||
pub fn replace_layer_texts(session: &mut Session, label: &str, edits: &[(LayerId, String)]) -> Result<()> {
|
||||
let current = &session.active().ok_or(EngineError::NoDocument)?.doc;
|
||||
for (id, _) in edits {
|
||||
check_text_unlocked(current, *id)?;
|
||||
}
|
||||
replace_layer_texts_with(session, label, edits, true, |text, value| {
|
||||
set_text(text, value);
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
/// Apply published template fields after the caller checks the mapping and
|
||||
/// compares live locks with the production baseline.
|
||||
pub fn replace_template_layer_texts(session: &mut Session, label: &str, edits: &[(LayerId, String)]) -> Result<()> {
|
||||
replace_layer_texts_with(session, label, edits, false, set_template_text)
|
||||
}
|
||||
@ -780,10 +786,6 @@ fn replace_layer_texts_with(
|
||||
session: &mut Session, label: &str, edits: &[(LayerId, String)], rename: bool,
|
||||
set: impl Fn(&mut TextLayer, &str) -> Result<()>,
|
||||
) -> Result<()> {
|
||||
let current = &session.active().ok_or(EngineError::NoDocument)?.doc;
|
||||
for (id, _) in edits {
|
||||
check_text_unlocked(current, *id)?;
|
||||
}
|
||||
session.edit(label, |doc, _| {
|
||||
let (dpi, format) = (doc.resolution_dpi, doc.pixel_format());
|
||||
for (id, value) in edits {
|
||||
|
||||
@ -1903,15 +1903,7 @@ impl Workspace {
|
||||
}
|
||||
|
||||
fn detail_layer_unchanged(&self, doc: &Document, layer: photocraft_doc::LayerId) -> bool {
|
||||
if self.product_layer_protected(layer) { return false; }
|
||||
let Some(basis) = &self.pi_canvas_basis else { return false; };
|
||||
basis.id == doc.id && basis.size == doc.size && basis.mode == doc.mode
|
||||
&& basis.depth == doc.depth && basis.icc_profile == doc.icc_profile && basis.global_light == doc.global_light
|
||||
&& basis.layer(layer).zip(doc.layer(layer)).is_some_and(|(before, now)| before == now)
|
||||
&& doc.path_of(layer).is_some_and(|path| {
|
||||
let locks = doc.locks_at(&path);
|
||||
!(locks.all || locks.position || locks.pixels)
|
||||
})
|
||||
self.production_layer_rejection(doc, layer).is_none()
|
||||
}
|
||||
|
||||
fn handover(&mut self) {
|
||||
|
||||
@ -1015,6 +1015,15 @@ fn valid_detail_adoption(w: &Workspace, doc: &Document, meta: &Value) -> bool {
|
||||
&& variant_unchanged && w.detail_layer_unchanged(doc, layer)
|
||||
}
|
||||
|
||||
fn adoption_block_reason(w: &Workspace, app: &PhotocraftApp, meta: &mut Value) -> Option<String> {
|
||||
if meta["detailBatch"] != true { return None; }
|
||||
let state = app.session.active()?;
|
||||
let layer = meta["nativeLayerId"].as_u64().map(photocraft_doc::LayerId)?;
|
||||
let reason = w.production_layer_rejection(&state.doc, layer)?;
|
||||
meta["writeBlockReason"] = json!(reason.code());
|
||||
Some(format!("{},候选已保留", reason.message()))
|
||||
}
|
||||
|
||||
fn adoption_write_mode(w: &Workspace, app: &PhotocraftApp) -> Option<Value> {
|
||||
let state = app.session.active()?;
|
||||
if app.layer_mask_targeted() || app.ui.mask_target || app.ui.vector_mask_target || app.ui.transform.is_some()
|
||||
@ -1493,7 +1502,7 @@ impl Workspace {
|
||||
// Only an acknowledged skeleton switch or initial document bind navigates.
|
||||
}
|
||||
|
||||
pub(super) fn canvas_adopt(&mut self, app: &mut PhotocraftApp, bytes: Vec<u8>, meta: Value) -> Option<(Value, bool)> {
|
||||
pub(super) fn canvas_adopt(&mut self, app: &mut PhotocraftApp, bytes: Vec<u8>, mut meta: Value) -> Option<(Value, bool)> {
|
||||
use std::sync::atomic::Ordering;
|
||||
let pending = self.canvas_workspace.pending_adoption.clone()?;
|
||||
let batch = meta["detailBatch"] == true;
|
||||
@ -1514,7 +1523,8 @@ impl Workspace {
|
||||
if pending["slotId"] == meta["slotId"] && pending["candidateId"] == meta["candidateId"] && pending["variantId"] == meta["variantId"] {
|
||||
self.canvas_workspace.pending_adoption = None;
|
||||
}
|
||||
self.error = "当前项目或画布已有变化,候选已保留,未覆盖编辑".into();
|
||||
self.error = adoption_block_reason(self, app, &mut meta)
|
||||
.unwrap_or_else(|| "当前项目或画布已有变化,候选已保留,未覆盖编辑".into());
|
||||
return Some((meta, false));
|
||||
}
|
||||
if self.canvas_workspace.adoption_worker.is_some() { return None; }
|
||||
@ -1574,7 +1584,13 @@ impl Workspace {
|
||||
.then(|| AdoptionSnapshot { before_doc:std::sync::Arc::new(before.clone()), source_digest });
|
||||
let mut prepared = photocraft_engine::Session::new();
|
||||
prepared.add_document(before, None);
|
||||
photocraft_engine::smart_cmds::replace_instance_bounded_fit(&mut prepared, photocraft_doc::LayerId(layer), original.as_ref(), &candidate_source, worker_meta["fit"] == "contain").map_err(|e| e.to_string())?;
|
||||
let replace = if batch {
|
||||
photocraft_engine::smart_cmds::replace_template_instance_bounded_fit
|
||||
} else {
|
||||
photocraft_engine::smart_cmds::replace_instance_bounded_fit
|
||||
};
|
||||
replace(&mut prepared, photocraft_doc::LayerId(layer), original.as_ref(), &candidate_source, worker_meta["fit"] == "contain")
|
||||
.map_err(|error| error.to_string())?;
|
||||
let mut updated = prepared.active().ok_or("候选无法准备")?.doc.as_ref().clone();
|
||||
let key = format!("jiansun.adopted.{variant}.{slot}");
|
||||
let first_placement = !updated.metadata.text.iter().any(|(k, _)| *k == key);
|
||||
@ -1638,8 +1654,10 @@ impl Workspace {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
if let Some(id) = worker.prewarm_id { crate::canvas::cancel_agent_adoption_prewarm(app, ctx, id); }
|
||||
if self.canvas_workspace.pending_adoption.as_ref() == Some(&worker.pending) { self.canvas_workspace.pending_adoption = None; }
|
||||
self.error = source_error.unwrap_or_else(|| "当前项目或画布已有变化,候选已保留,未覆盖编辑".into());
|
||||
return Some((worker.meta, false));
|
||||
let mut meta = worker.meta;
|
||||
self.error = adoption_block_reason(self, app, &mut meta).or(source_error)
|
||||
.unwrap_or_else(|| "当前项目或画布已有变化,候选已保留,未覆盖编辑".into());
|
||||
return Some((meta, false));
|
||||
}
|
||||
let prewarm_id = worker.prewarm_id;
|
||||
let prepared = if let Some(id) = prewarm_id {
|
||||
@ -1754,7 +1772,8 @@ impl Workspace {
|
||||
};
|
||||
if !valid {
|
||||
if self.canvas_workspace.pending_adoption.as_ref() == Some(&worker.pending) { self.canvas_workspace.pending_adoption = None; }
|
||||
self.error = "当前项目或画布已有变化,候选已保留,未覆盖编辑".into();
|
||||
self.error = adoption_block_reason(self, app, &mut meta)
|
||||
.unwrap_or_else(|| "当前项目或画布已有变化,候选已保留,未覆盖编辑".into());
|
||||
return Some((meta, false));
|
||||
}
|
||||
self.canvas_workspace.pending_adoption = None;
|
||||
@ -3643,7 +3662,7 @@ pub(crate) fn protects_layer_deletion(app: &PhotocraftApp, command: &str, params
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
pub(super) mod tests {
|
||||
use super::*;
|
||||
use super::super::Event;
|
||||
|
||||
@ -4221,7 +4240,7 @@ mod tests {
|
||||
assert!(requests.try_iter().all(|request| !matches!(request, Request::Action(method, _) if method == "slot-append")), "presentation must never dispatch an image generation");
|
||||
}
|
||||
|
||||
pub(super) fn native_fixture() -> (Workspace, PhotocraftApp, mpsc::Receiver<Request>, u64, Vec<u8>) {
|
||||
pub(in crate::jiansun) fn native_fixture() -> (Workspace, PhotocraftApp, mpsc::Receiver<Request>, u64, Vec<u8>) {
|
||||
use photocraft_doc::{Affine, Layer, LayerContent, SmartObject, SmartSource};
|
||||
let png = |w, h, color| {
|
||||
let image = photocraft_codecs::Image::from_u8(w, h, photocraft_codecs::ChannelLayout::Rgba, vec![color; (w * h * 4) as usize]).unwrap();
|
||||
@ -4271,7 +4290,7 @@ mod tests {
|
||||
|
||||
static ADOPTION_TEST_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(());
|
||||
|
||||
fn adopt_and_wait(w: &mut Workspace, app: &mut PhotocraftApp, bytes: Vec<u8>, meta: Value) {
|
||||
pub(in crate::jiansun) fn adopt_and_wait(w: &mut Workspace, app: &mut PhotocraftApp, bytes: Vec<u8>, meta: Value) {
|
||||
let _guard = ADOPTION_TEST_LOCK.lock().unwrap_or_else(|error| error.into_inner());
|
||||
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(15);
|
||||
let pending = w.canvas_workspace.pending_adoption.clone();
|
||||
@ -5554,7 +5573,7 @@ mod tests {
|
||||
Err(error) => error,
|
||||
Ok(receipt) => receipt["error"]["message"].as_str().unwrap_or("").to_owned(),
|
||||
};
|
||||
assert_eq!(reason, "当前图位已有手动修改,候选已保留");
|
||||
assert_eq!(reason, "当前图层已有手动修改,候选已保留");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@ -195,13 +195,8 @@ fn production_text_frame(field: &Value) -> Option<photocraft_doc::Rect> {
|
||||
|
||||
fn pending_detail_copy(w: &Workspace, doc: &photocraft_doc::Document, field: &Value) -> bool {
|
||||
let Some(id) = field["layer"].as_u64().map(photocraft_doc::LayerId) else { return false };
|
||||
if field["templateSample"] == true {
|
||||
return !w.product_layer_protected(id) && doc.path_of(id).is_some_and(|path| {
|
||||
let locks = doc.locks_at(&path);
|
||||
!locks.all && !locks.position && !locks.pixels
|
||||
});
|
||||
}
|
||||
field["currentText"].as_str().is_none_or(|text| text.trim().is_empty()) && w.detail_layer_unchanged(doc, id)
|
||||
(field["templateSample"] == true || field["currentText"].as_str().is_none_or(|text| text.trim().is_empty()))
|
||||
&& w.detail_layer_unchanged(doc, id)
|
||||
}
|
||||
|
||||
fn image_linked_copy(doc: &photocraft_doc::Document, slot_id: &Value) -> Vec<Value> {
|
||||
@ -434,24 +429,16 @@ fn action_impl(w: &mut Workspace, app: &mut PhotocraftApp, ctx: Option<&egui::Co
|
||||
let layer = item["layer"].as_u64().filter(|id| seen.insert(*id)).ok_or("文字格身份重复或无效")?;
|
||||
let id = photocraft_doc::LayerId(layer);
|
||||
let Some(field) = fields.iter().find(|row| row["layer"] == layer) else {
|
||||
rejected.push(json!({"layer":layer,"reason":"该文字格已填写或不属于模板"}));
|
||||
rejected.push(json!({"layer":layer,"code":"layer_precondition_failed","reason":"该文字格不属于当前模板映射"}));
|
||||
continue;
|
||||
};
|
||||
let current = field["currentText"].as_str().unwrap_or_default();
|
||||
let writable = || active.doc.path_of(id).is_some_and(|path| {
|
||||
let locks = active.doc.locks_at(&path);
|
||||
!(locks.all || locks.position || locks.pixels)
|
||||
});
|
||||
if match_fields {
|
||||
if w.product_layer_protected(id) || item["expectedText"].as_str() != Some(current) || !writable() {
|
||||
rejected.push(json!({"layer":layer,"reason":"文字格原文或编辑权限已变化,保留当前内容"}));
|
||||
continue;
|
||||
}
|
||||
} else if w.product_layer_protected(id) {
|
||||
if let Some(reason) = w.production_layer_rejection(&active.doc, id) {
|
||||
rejected.push(json!({"layer":layer,"code":reason.code(),"reason":reason.message()}));
|
||||
continue;
|
||||
} else if current.trim().is_empty() {
|
||||
if !w.detail_layer_unchanged(&active.doc, id) { continue; }
|
||||
} else if item["expectedText"].as_str() != Some(current) || !writable() {
|
||||
}
|
||||
if (match_fields || !current.trim().is_empty()) && item["expectedText"].as_str() != Some(current) {
|
||||
rejected.push(json!({"layer":layer,"code":"layer_precondition_failed","reason":"文字格原文与读取值不一致,保留当前内容"}));
|
||||
continue;
|
||||
}
|
||||
let text = item["text"].as_str().ok_or("缺少填写文字")?;
|
||||
@ -476,9 +463,8 @@ fn action_impl(w: &mut Workspace, app: &mut PhotocraftApp, ctx: Option<&egui::Co
|
||||
let remaining = fields.iter().filter(|field| pending_detail_copy(w, &active.doc, field)
|
||||
&& !edits.iter().any(|(layer, _)| field["layer"] == layer.0)).count();
|
||||
if count == 0 { return Ok(json!({"applied":0,"appliedLayers":[],"pending":remaining,"rejected":rejected,"revision":active.revision})); }
|
||||
let edited_ids: Vec<_> = edits.iter()
|
||||
.filter_map(|(id, _)| w.detail_layer_unchanged(&active.doc, *id).then_some(*id)).collect();
|
||||
if !edited_ids.is_empty() { w.record_product_view_edits(app); }
|
||||
let edited_ids: Vec<_> = edits.iter().map(|(id, _)| *id).collect();
|
||||
w.record_product_view_edits(app);
|
||||
photocraft_engine::type_cmds::replace_template_layer_texts(&mut app.session, "回填商品文案", &edits)
|
||||
.map_err(|error| error.to_string())?;
|
||||
if !w.product_target_hidden { app.sync_views(); }
|
||||
@ -655,6 +641,8 @@ fn action_impl(w: &mut Workspace, app: &mut PhotocraftApp, ctx: Option<&egui::Co
|
||||
let production_progress = private && w.pi_request_scope["productProduction"] == true && input["production"].is_object();
|
||||
if !production_progress && (!text.is_empty() || thinking.is_none()) { w.stream_reply = text.into(); }
|
||||
if production_progress
|
||||
&& input["production"]["outputId"] == w.pi_request_scope["outputId"]
|
||||
&& input["production"]["variantId"] == w.pi_request_scope["variantId"]
|
||||
&& let Some(notice) = w.workflow.set_production_progress(&input["production"])
|
||||
{
|
||||
w.messages.push(json!({"role":"assistant","kind":"activity","text":notice,"run":w.pi_run}));
|
||||
@ -1498,6 +1486,8 @@ mod tests {
|
||||
assert_eq!(receipt["revision"], revision + 1);
|
||||
assert_eq!(receipt["rejected"].as_array().unwrap().iter().map(|rejection| rejection["layer"].as_u64().unwrap())
|
||||
.collect::<Vec<_>>(), vec![title, locked]);
|
||||
assert_eq!(receipt["rejected"][0]["code"], "layer_manually_edited");
|
||||
assert_eq!(receipt["rejected"][1]["code"], "layer_newly_locked");
|
||||
let read = action_impl(&mut w, &mut app, None, "pi-detail-copy-fields",
|
||||
&json!({"run":run,"documentId":doc,"includeFilled":true}), true).unwrap();
|
||||
assert_eq!(read["fields"][0]["currentText"], "用户标题");
|
||||
@ -1578,7 +1568,8 @@ mod tests {
|
||||
let receipt = action_impl(&mut w, &mut app, None, "pi-detail-copy-apply",
|
||||
&json!({"run":run,"revision":revision,"items":items}), true).unwrap();
|
||||
assert_eq!(receipt["appliedLayers"], json!([second, sample, narrow, optional]));
|
||||
assert!(receipt["rejected"].as_array().unwrap().is_empty());
|
||||
assert_eq!(receipt["rejected"][0]["layer"], first);
|
||||
assert_eq!(receipt["rejected"][0]["code"], "layer_manually_edited");
|
||||
assert!(receipt["layoutWarnings"].as_array().unwrap().iter().any(|warning| warning["layer"] == narrow));
|
||||
assert_eq!(receipt["pending"], 0);
|
||||
let doc = &app.session.active().unwrap().doc;
|
||||
|
||||
@ -71,8 +71,8 @@ pub(super) struct Views {
|
||||
saving: Option<u64>,
|
||||
failed_revision: Option<u64>,
|
||||
can_reuse_saved_view: bool,
|
||||
editor_basis: Option<Arc<Document>>,
|
||||
user_layers: HashMap<Stage, HashSet<LayerId>>,
|
||||
editor_basis: Option<(Stage, Arc<Document>)>,
|
||||
user_layers: HashMap<Stage, HashMap<LayerId, LayerRejection>>,
|
||||
waiting_stage: Option<Value>,
|
||||
}
|
||||
|
||||
@ -91,6 +91,54 @@ impl Views {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
pub(super) enum LayerRejection {
|
||||
UserEdit,
|
||||
UserLock,
|
||||
Precondition,
|
||||
}
|
||||
|
||||
impl LayerRejection {
|
||||
pub(super) fn code(self) -> &'static str {
|
||||
match self {
|
||||
Self::UserEdit => "layer_manually_edited",
|
||||
Self::UserLock => "layer_newly_locked",
|
||||
Self::Precondition => "layer_precondition_failed",
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn message(self) -> &'static str {
|
||||
match self {
|
||||
Self::UserEdit => "当前图层已有手动修改",
|
||||
Self::UserLock => "当前图层或其父组有制作期间新增的锁",
|
||||
Self::Precondition => "当前图层的写入前置条件已变化",
|
||||
}
|
||||
}
|
||||
|
||||
fn check(basis: &Document, doc: &Document, id: LayerId) -> Option<Self> {
|
||||
if basis.id != doc.id { return Some(Self::Precondition); }
|
||||
let Some(path) = doc.path_of(id) else { return Some(Self::Precondition); };
|
||||
let Some(before) = basis.layer(id) else { return Some(Self::Precondition); };
|
||||
let now = doc.layer_at(&path).unwrap();
|
||||
// Check each ancestor as well as the target, even if a template
|
||||
// ancestor already contributes the same effective lock.
|
||||
if (1..=path.len()).filter_map(|n| doc.layer_at(&path[..n])).any(|layer| {
|
||||
let old = basis.layer(layer.id).map_or_else(Default::default, |layer| layer.locks);
|
||||
let new = layer.locks;
|
||||
new.all && !old.all || new.pixels && !old.pixels || new.position && !old.position
|
||||
|| new.transparency && !old.transparency || new.artboard && !old.artboard
|
||||
}) {
|
||||
return Some(Self::UserLock);
|
||||
}
|
||||
if basis.size != doc.size || before != now { return Some(Self::UserEdit); }
|
||||
if basis.mode != doc.mode || basis.depth != doc.depth
|
||||
|| basis.icc_profile != doc.icc_profile || basis.global_light != doc.global_light {
|
||||
return Some(Self::Precondition);
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl Workspace {
|
||||
pub(super) fn accepts_production_epoch(&self, epoch: &Value) -> bool {
|
||||
epoch.is_null() || epoch.as_u64() == Some(self.write_epoch)
|
||||
@ -215,10 +263,18 @@ impl Workspace {
|
||||
self.production_canvas(app).map(|(state, _)| (state.doc.id.0, state.revision))
|
||||
}
|
||||
|
||||
pub(super) fn product_layer_protected(&self, layer: LayerId) -> bool {
|
||||
self.product_production.as_ref().and_then(|run| run.bound.as_ref())
|
||||
.and_then(|stage| self.product_views.user_layers.get(stage))
|
||||
.is_some_and(|layers| layers.contains(&layer))
|
||||
pub(super) fn production_layer_rejection(&self, doc: &Document, layer: LayerId) -> Option<LayerRejection> {
|
||||
let key = &self.pi_request_scope["documentKey"];
|
||||
if key.is_object() && *key != super::product_document_key(doc) {
|
||||
return Some(LayerRejection::Precondition);
|
||||
}
|
||||
let live = self.pi_canvas_basis.as_ref().map_or(Some(LayerRejection::Precondition), |basis| {
|
||||
LayerRejection::check(basis, doc, layer)
|
||||
});
|
||||
if live == Some(LayerRejection::UserLock) { return live; }
|
||||
let recorded = Stage::read(&self.template_workflow)
|
||||
.and_then(|stage| self.product_views.user_layers.get(&stage)?.get(&layer).copied());
|
||||
recorded.or(live)
|
||||
}
|
||||
|
||||
pub(super) fn with_product_target<T>(&mut self, app: &mut PhotocraftApp, action: impl FnOnce(&mut Self, &mut PhotocraftApp) -> T) -> T {
|
||||
@ -376,13 +432,14 @@ impl Workspace {
|
||||
}
|
||||
|
||||
pub(super) fn sync_product_editor_basis_layers(&mut self, doc: &Document, layers: &[LayerId]) {
|
||||
let Some(basis) = self.product_views.editor_basis.as_mut()
|
||||
.filter(|basis| basis.id == doc.id && basis.size == doc.size) else { return; };
|
||||
let user_layers = Stage::read(&self.template_workflow)
|
||||
.and_then(|stage| self.product_views.user_layers.get(&stage));
|
||||
if self.product_target_hidden { return; }
|
||||
let Some(stage) = Stage::read(&self.template_workflow) else { return; };
|
||||
let Some((_, basis)) = self.product_views.editor_basis.as_mut()
|
||||
.filter(|(owner, basis)| *owner == stage && basis.id == doc.id && basis.size == doc.size) else { return; };
|
||||
let user_layers = self.product_views.user_layers.get(&stage);
|
||||
let basis = Arc::make_mut(basis);
|
||||
for &id in layers {
|
||||
if user_layers.is_some_and(|layers| layers.contains(&id)) { continue; }
|
||||
if user_layers.is_some_and(|layers| layers.contains_key(&id)) { continue; }
|
||||
if let Some((before, after)) = basis.layer_mut(id).zip(doc.layer(id)) {
|
||||
*before = after.clone();
|
||||
}
|
||||
@ -390,18 +447,20 @@ impl Workspace {
|
||||
}
|
||||
|
||||
pub(super) fn record_product_view_edits(&mut self, app: &PhotocraftApp) {
|
||||
let Some(basis) = self.product_views.editor_basis.as_ref() else { return; };
|
||||
if self.product_target_hidden { return; }
|
||||
let Some((stage, basis)) = self.product_views.editor_basis.as_ref() else { return; };
|
||||
let Some(state) = app.session.active() else { return; };
|
||||
if basis.id != state.doc.id { return; }
|
||||
let Some(stage) = Stage::read(&self.template_workflow) else { return; };
|
||||
if basis.id != state.doc.id || Stage::read(&self.template_workflow).as_ref() != Some(stage) { return; }
|
||||
let Some(mapping) = canvas_workspace::document_mapping(&state.doc) else { return; };
|
||||
let changed = self.product_views.user_layers.entry(stage).or_default();
|
||||
let changed = self.product_views.user_layers.entry(stage.clone()).or_default();
|
||||
for id in mapping["outputs"].as_array().into_iter().flatten()
|
||||
.flat_map(|page| page["mapping"]["fields"].as_array().into_iter().flatten())
|
||||
.filter_map(|field| field["nativeLayerId"].as_u64()).map(LayerId)
|
||||
{
|
||||
if basis.size != state.doc.size || basis.layer(id) != state.doc.layer(id) {
|
||||
changed.insert(id);
|
||||
match LayerRejection::check(basis, &state.doc, id) {
|
||||
Some(LayerRejection::UserLock) => { changed.insert(id, LayerRejection::UserLock); }
|
||||
Some(LayerRejection::UserEdit) => { changed.entry(id).or_insert(LayerRejection::UserEdit); }
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -476,7 +535,7 @@ impl Workspace {
|
||||
self.persisted_revisions.remove(&worker.doc.id.0);
|
||||
active.path = meta["previousViewPath"].as_str().map(str::to_owned);
|
||||
self.canvas_workspace.scope_switch_in_flight = false;
|
||||
self.product_views.editor_basis = Some(active.doc.clone());
|
||||
self.product_views.editor_basis = visible.map(|stage| (stage, active.doc.clone()));
|
||||
self.product_views.worker = Some(Canvas { document: worker, workflow: meta["workflow"].clone(),
|
||||
workspace: canvas_workspace::State::default(), camera: None });
|
||||
self.with_product_target(app, |w, app| {
|
||||
@ -588,13 +647,13 @@ impl Workspace {
|
||||
} else {
|
||||
self.product_views.worker = Some(view);
|
||||
}
|
||||
self.product_views.editor_basis = app.session.active().map(|state| state.doc.clone());
|
||||
self.product_views.editor_basis = app.session.active().map(|state| (request.stage, state.doc.clone()));
|
||||
self.product_views.can_reuse_saved_view = true;
|
||||
}
|
||||
ViewTarget::Loaded(doc, value) => {
|
||||
// A result can finish loading as its production stage starts.
|
||||
// In that case the already open worker is the live editor.
|
||||
if self.product_views.worker.as_ref().and_then(|worker| Stage::read(&worker.workflow)) == Some(request.stage) {
|
||||
if self.product_views.worker.as_ref().and_then(|worker| Stage::read(&worker.workflow)).as_ref() == Some(&request.stage) {
|
||||
let Some(mut worker) = self.product_views.worker.take() else { return; };
|
||||
worker.swap_view(self, app);
|
||||
self.product_views.remember(worker, Stage::read(&self.template_workflow));
|
||||
@ -608,7 +667,7 @@ impl Workspace {
|
||||
} else {
|
||||
self.product_views.worker = Some(view);
|
||||
}
|
||||
self.product_views.editor_basis = app.session.active().map(|state| state.doc.clone());
|
||||
self.product_views.editor_basis = app.session.active().map(|state| (request.stage, state.doc.clone()));
|
||||
self.product_views.can_reuse_saved_view = value["canReuseSavedView"] == true;
|
||||
self.canvas_opened(&value);
|
||||
}
|
||||
@ -1361,6 +1420,9 @@ impl Workspace {
|
||||
self.pi_canvas_basis = Some(canvas.doc.clone());
|
||||
self.pi_manual_edit = false;
|
||||
self.allow_apply = false;
|
||||
if run.bound.as_ref() != Some(&stage) {
|
||||
self.workflow.clear_production_progress();
|
||||
}
|
||||
run.bound = Some(stage);
|
||||
run.phase = Phase::Agent;
|
||||
self.checkpoint_production();
|
||||
@ -2884,6 +2946,144 @@ mod tests {
|
||||
]));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shared_tab_keeps_sku_writes_and_visible_detail_edits_on_their_own_canvases() {
|
||||
use super::super::{pi_bridge, workflow_bridge};
|
||||
use super::canvas_workspace::tests::{adopt_and_wait, native_fixture};
|
||||
use photocraft_doc::{Layer, Size};
|
||||
|
||||
let (mut w, mut app, _requests, first, bytes) = native_fixture();
|
||||
let copy = app.session.execute("type.create", json!({"text":"样稿","size":18})).unwrap()["layer"].as_u64().unwrap();
|
||||
let mut sku = app.session.active().unwrap().doc.as_ref().clone();
|
||||
let doc = sku.id.0;
|
||||
sku.size = Size::new(720, 720);
|
||||
let image = sku.layer(LayerId(first)).unwrap().content.clone();
|
||||
let mut second = Layer::new("模板锁定图位", image.clone());
|
||||
second.locks.all = true;
|
||||
let second_id = second.id.0;
|
||||
sku.layers.push(second);
|
||||
let third = Layer::new("制作中锁定图位", image);
|
||||
let third_id = third.id.0;
|
||||
let group = Layer::group("第三个图位的父组", vec![third]);
|
||||
let group_id = group.id;
|
||||
sku.layers.push(group);
|
||||
sku.layer_mut(LayerId(copy)).unwrap().locks.all = true;
|
||||
let slots = [("K01-I01", first), ("K01-I02", second_id), ("K02-I01", third_id)];
|
||||
let mut fields: Vec<_> = slots.iter().map(|(slot, layer)|
|
||||
json!({"kind":"image","slotId":slot,"nativeLayerId":layer})).collect();
|
||||
fields.push(json!({"kind":"text","nativeLayerId":copy,"fieldId":"K01-T01","originalText":"样稿"}));
|
||||
sku.metadata.text.retain(|(key, _)| key != "jiansun.slot-mapping.v1");
|
||||
sku.metadata.text.push(("jiansun.slot-mapping.v1".into(), json!({
|
||||
"version":1,"canvasFirst":true,"workspaceId":"workspace","templateId":"template",
|
||||
"templateVersion":"1","templateHash":"sku","variantId":"wood","component":"sku_images",
|
||||
"outputs":[{"documentId":"K01","mapping":{"fields":fields}}]
|
||||
}).to_string()));
|
||||
let sku_workflow = json!({
|
||||
"workspaceId":"workspace","templateId":"template","templateVersion":"1","templateHash":"sku",
|
||||
"revision":5,"canvasFirst":true,"outputId":"sku_images","variantId":"wood",
|
||||
"outputs":[{"outputId":"sku_images","documentId":"K01","height":720}],
|
||||
"slots":slots.map(|(id, layer)| json!({"id":id,"nativeLayerId":layer,
|
||||
"variantId":"wood","outputId":"sku_images","documentId":"K01","kind":"image",
|
||||
"candidates":[{"id":"candidate","status":"complete"}]})),
|
||||
"capabilities":{"imageDispatchAllowed":true,"localApplyAllowed":true}
|
||||
});
|
||||
let project_id = "12345678-1234-4234-8234-123456789012";
|
||||
let local = w.local_identity(project_id);
|
||||
w.open_projects.insert(doc, local.clone());
|
||||
w.workflow.bind_identity(&"a".repeat(64), project_id, doc);
|
||||
w.owner_doc = Some(doc);
|
||||
w.loaded_draft = Some(doc);
|
||||
w.creation_doc = Some(doc);
|
||||
w.pi_run = Some("sku-run".into());
|
||||
w.pi_binding = json!({"accountId":"owner","origin":w.origin});
|
||||
w.pi_request_scope = json!({"productProduction":true,"outputId":"detail","variantId":"wood",
|
||||
"account":{"id":"owner","origin":w.origin},"project":{"documentId":doc,"localId":local}});
|
||||
let detail = Stage::read(&w.template_workflow).unwrap();
|
||||
let sku_stage = Stage::read(&sku_workflow).unwrap();
|
||||
let mut run = Run::new(doc, local, json!("workspace"), vec![detail.clone(), sku_stage.clone()], None, Phase::CanvasRequested);
|
||||
run.bound = Some(detail.clone());
|
||||
run.opening = Some(sku_stage.clone());
|
||||
w.product_production = Some(run);
|
||||
w.workflow.set_production_progress(&json!({"outputId":"detail","variantId":"wood",
|
||||
"rendered":3,"total":21,"pictureCells":[{"slotId":"S01"}]}));
|
||||
w.continue_product_canvas(&mut app, Box::new(sku), json!({"continueProduct":true,"doc":doc,
|
||||
"workspaceId":"workspace","accountId":"owner","origin":w.origin,"outputId":"sku_images",
|
||||
"variantId":"wood","workflow":sku_workflow}));
|
||||
assert_eq!(app.session.active().unwrap().doc.id.0, doc);
|
||||
assert_ne!(app.session.active().unwrap().doc.size, Size::new(720, 720));
|
||||
assert!(w.product_view_detached());
|
||||
|
||||
let ctx = egui::Context::default();
|
||||
let dispatch = |w: &mut Workspace, app: &mut PhotocraftApp, index, slot: &str| {
|
||||
w.track_pi_canvas(app);
|
||||
w.allow_apply = true;
|
||||
let read = workflow_bridge::action(w, app, "pi-workflow-read", &json!({"run":"sku-run","documentId":doc})).unwrap();
|
||||
workflow_bridge::action(w, app, "pi-workflow-execute", &json!({
|
||||
"run":"sku-run","documentId":doc,"version":read["version"],"intent":"adopt_candidate",
|
||||
"operationId":format!("07803e30-ab64-4e90-90c0-ec4a44518cd{index}"),
|
||||
"slotId":slot,"candidateId":"candidate","outputId":w.template_workflow["outputId"],"productVariantId":"wood"
|
||||
})).unwrap()
|
||||
};
|
||||
w.with_product_target(&mut app, |w, app| {
|
||||
w.bind_production_canvas(app);
|
||||
w.busy = Some("pi-agent".into());
|
||||
let active = app.session.active().unwrap();
|
||||
assert_eq!(active.doc.id.0, doc);
|
||||
assert_eq!(active.doc.size, Size::new(720, 720));
|
||||
assert!(w.workflow.production_progress().is_null());
|
||||
pi_bridge::private_action_in_ui(w, app, &ctx, "pi-delta", &json!({"run":"sku-run","text":"",
|
||||
"production":{"outputId":"detail","variantId":"wood","pictureCells":[{"slotId":"S01"}]}})).unwrap();
|
||||
assert!(w.workflow.production_progress().is_null());
|
||||
|
||||
for (index, (slot, layer)) in slots[..2].iter().enumerate() {
|
||||
let result = dispatch(w, app, index, slot);
|
||||
assert_eq!(result["phase"], "submitted", "{result}");
|
||||
let mut meta = result["__workflowDelegation"]["input"].clone();
|
||||
meta["accountId"] = json!("owner");
|
||||
meta["origin"] = json!(w.origin);
|
||||
for (key, source) in [("outputId","outputId"), ("workspaceId","id"), ("templateHash","templateHash")] {
|
||||
meta[key] = meta["detailWorkspace"][source].clone();
|
||||
}
|
||||
adopt_and_wait(w, app, bytes.clone(), meta.clone());
|
||||
assert!(w.error.is_empty(), "{}", w.error);
|
||||
assert!(w.workflow.adoption_receipt(&meta, true, None));
|
||||
assert_eq!(canvas_workspace::adopted(&app.session.active().unwrap().doc, slot, "wood"), Some("candidate"));
|
||||
assert!(w.detail_layer_unchanged(&app.session.active().unwrap().doc, LayerId(*layer)));
|
||||
}
|
||||
assert!(app.session.active().unwrap().doc.layer(LayerId(second_id)).unwrap().locks.all);
|
||||
let pending = pi_bridge::private_action_in_ui(w, app, &ctx, "pi-detail-copy-fields",
|
||||
&json!({"run":"sku-run","documentId":doc})).unwrap();
|
||||
assert_eq!(pending[0]["layer"], copy);
|
||||
let revision = app.session.active().unwrap().revision;
|
||||
let receipt = pi_bridge::private_action_in_ui(w, app, &ctx, "pi-detail-copy-apply", &json!({
|
||||
"run":"sku-run","documentId":doc,"revision":revision,"matchFields":true,
|
||||
"items":[{"layer":copy,"expectedText":"样稿","text":"橡木色"}]
|
||||
})).unwrap();
|
||||
assert_eq!(receipt["appliedLayers"], json!([copy]), "{receipt}");
|
||||
assert!(app.session.active().unwrap().doc.layer(LayerId(copy)).unwrap().locks.all);
|
||||
|
||||
app.session.edit("用户锁定图组", |doc, _| {
|
||||
doc.layer_mut(group_id).unwrap().locks.all = true;
|
||||
Ok(())
|
||||
}).unwrap();
|
||||
let receipt = dispatch(w, app, 2, slots[2].0);
|
||||
assert_eq!(receipt["phase"], "not_dispatched", "{receipt}");
|
||||
assert_eq!(receipt["error"]["reason"], "layer_newly_locked");
|
||||
});
|
||||
assert!(w.product_views.user_layers.get(&sku_stage).is_none());
|
||||
app.session.execute("layer.setProps", json!({"layer":first,"name":"用户修改详情图位"})).unwrap();
|
||||
let detail_workflow = w.template_workflow.clone();
|
||||
let run = w.product_production.as_mut().unwrap();
|
||||
run.opening = Some(detail);
|
||||
run.phase = Phase::CanvasRequested;
|
||||
assert!(w.join_product_view(&mut app, &json!({"continueProduct":true,"doc":doc,"workspaceId":"workspace",
|
||||
"accountId":"owner","origin":w.origin,"outputId":"detail","variantId":"wood","workflow":detail_workflow})));
|
||||
w.bind_production_canvas(&app);
|
||||
assert_eq!(w.production_layer_rejection(&app.session.active().unwrap().doc, LayerId(first))
|
||||
.map(LayerRejection::code), Some("layer_manually_edited"));
|
||||
assert_eq!(app.session.active().unwrap().doc.layer(LayerId(first)).unwrap().name, "用户修改详情图位");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reading_another_product_output_keeps_the_agent_lease_and_saves_user_edits_to_their_own_output() {
|
||||
let (tx, requests) = mpsc::channel();
|
||||
|
||||
@ -50,6 +50,10 @@ impl State {
|
||||
|
||||
pub(super) fn clear(&mut self) {
|
||||
self.pending = None;
|
||||
self.clear_production_progress();
|
||||
}
|
||||
|
||||
pub(super) fn clear_production_progress(&mut self) {
|
||||
self.production_progress = Value::Null;
|
||||
}
|
||||
|
||||
@ -226,7 +230,10 @@ impl State {
|
||||
for key in ["overlayLayers", "overlayNote", "afterRevision"] {
|
||||
if let Some(value) = meta.get(key) { op[key] = value.clone(); }
|
||||
}
|
||||
} else { op["message"] = json!(error); }
|
||||
} else {
|
||||
op["message"] = json!(error);
|
||||
if let Some(reason) = meta.get("writeBlockReason") { op["writeBlockReason"] = reason.clone(); }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
false
|
||||
@ -663,12 +670,14 @@ fn read(w: &Workspace, version: u64, section: &str, output: &str, offset: usize,
|
||||
let candidates=slot["candidates"].as_array().into_iter().flatten().rev().map(|candidate| json!({"id":clip(&candidate["id"],100),"variant":clip(&candidate["variant"],100),"status":clip(&candidate["status"],24),"sourceType":candidate["sourceType"],
|
||||
"materialTaskId":candidate["materialTaskId"],"sourceRequestId":candidate["sourceRequestId"],
|
||||
"reused":candidate["reusedFrom"].is_object()})).collect::<Vec<_>>();
|
||||
let manually_edited = w.pi_request_scope["productProduction"] == true && w.pi_canvas_basis.is_some()
|
||||
&& slot["nativeLayerId"].as_u64().is_some_and(|id| active_doc
|
||||
.is_some_and(|doc| !w.detail_layer_unchanged(doc, photocraft_doc::LayerId(id))));
|
||||
let rejection = if w.pi_request_scope["productProduction"] == true && w.pi_canvas_basis.is_some() {
|
||||
slot["nativeLayerId"].as_u64().zip(active_doc)
|
||||
.and_then(|(id, doc)| w.production_layer_rejection(doc, photocraft_doc::LayerId(id)))
|
||||
} else { None };
|
||||
json!({"id":clip(&slot["id"],160),"fieldId":clip(&slot["fieldId"],100),"documentId":clip(&slot["documentId"],100),"outputId":output,
|
||||
"label":clip(&slot["label"],160),"selectedCandidateId":if w.template_workflow["canvasFirst"]==true{adopted(&slot["id"])}else{slot["selectedCandidateId"].clone()},
|
||||
"sourcePolicy":slot["sourcePolicy"],"manuallyEdited":manually_edited,"candidates":candidates,
|
||||
"sourcePolicy":slot["sourcePolicy"],"manuallyEdited":rejection == Some(super::product_production::LayerRejection::UserEdit),
|
||||
"writeBlockReason":rejection.map(|reason| reason.code()),"candidates":candidates,
|
||||
"role":slot["role"],"requirements":slot["requirements"],
|
||||
"templatePrompt":slot["templatePrompt"],"relatedFields":slot["relatedFields"],
|
||||
"layoutReference":slot["layoutReference"],"textRegions":slot["textRegions"],"productionRule":slot["productionRule"]})
|
||||
@ -799,11 +808,12 @@ fn execute(w: &mut Workspace, app: &mut PhotocraftApp, input: &Value, version: u
|
||||
operation_input["detailWorkspace"] = json!({"id":w.template_workflow["workspaceId"],
|
||||
"templateHash":w.template_workflow["templateHash"],"structureHash":w.template_workflow["structureHash"],
|
||||
"outputId":output_id,"variantId":input["productVariantId"]});
|
||||
if intent == "adopt_candidate" && w.pi_canvas_basis.is_some()
|
||||
&& operation_input["nativeLayerId"].as_u64().is_some_and(|id| app.session.active()
|
||||
.is_some_and(|state| !w.detail_layer_unchanged(&state.doc, photocraft_doc::LayerId(id))))
|
||||
if intent == "adopt_candidate"
|
||||
&& let Some((layer, state)) = operation_input["nativeLayerId"].as_u64().zip(app.session.active())
|
||||
&& let Some(reason) = w.production_layer_rejection(&state.doc, photocraft_doc::LayerId(layer))
|
||||
{
|
||||
return Err("当前图位已有手动修改,候选已保留".into());
|
||||
return Ok(not_dispatched(w, &id, json!(state.revision),
|
||||
&format!("{},候选已保留", reason.message()), Some(reason.code())));
|
||||
}
|
||||
}
|
||||
if let Some(fit) = input.get("fit") {
|
||||
@ -885,6 +895,15 @@ fn execute(w: &mut Workspace, app: &mut PhotocraftApp, input: &Value, version: u
|
||||
"writeEpoch":w.pi_request_scope["writeEpoch"],"projectLocalId":w.pi_request_scope["project"]["localId"]}}))
|
||||
}
|
||||
|
||||
fn not_dispatched(w: &Workspace, id: &str, revision: Value, message: &str, reason: Option<&str>) -> Value {
|
||||
let mut receipt = json!({"operationId":id,"phase":"not_dispatched","accepted":false,"dispatched":false,
|
||||
"run":w.pi_run,"documentId":w.owner_doc,"baseRevision":revision,"accountId":w.account["id"],
|
||||
"origin":w.origin,"projectLocalId":w.pi_request_scope["project"]["localId"],
|
||||
"error":{"code":"local_precondition_failed","message":message}});
|
||||
if let Some(reason) = reason { receipt["error"]["reason"] = json!(reason); }
|
||||
receipt
|
||||
}
|
||||
|
||||
pub(super) fn action(w: &mut Workspace, app: &mut PhotocraftApp, method: &str, input: &Value) -> Result<Value, String> {
|
||||
active_run(w, app, input)?;
|
||||
let current_guard = guard(w, app);
|
||||
@ -927,16 +946,14 @@ pub(super) fn action(w: &mut Workspace, app: &mut PhotocraftApp, method: &str, i
|
||||
"message":op["message"],"retryableFailure":op["retryableFailure"],"retryAfterSeconds":op["retryAfterSeconds"]});
|
||||
copy_expiry(op, &mut receipt);
|
||||
if let Some(persistence) = op.get("persistence") { receipt["persistence"] = persistence.clone(); }
|
||||
if let Some(reason) = op.get("writeBlockReason") { receipt["writeBlockReason"] = reason.clone(); }
|
||||
Ok(receipt)
|
||||
}
|
||||
"pi-workflow-execute" => {
|
||||
let result = execute(w, app, input, version, available);
|
||||
if let (Err(message), Ok(id)) = (&result, operation_id(input))
|
||||
&& available && !w.workflow.operations.iter().any(|op| op["operationId"] == id) {
|
||||
return Ok(json!({"operationId":id,"phase":"not_dispatched","accepted":false,"dispatched":false,
|
||||
"run":w.pi_run,"documentId":w.owner_doc,"baseRevision":current_guard["canvas"]["revision"],"accountId":w.account["id"],
|
||||
"origin":w.origin,"projectLocalId":w.pi_request_scope["project"]["localId"],
|
||||
"error":{"code":"local_precondition_failed","message":message}}));
|
||||
return Ok(not_dispatched(w, &id, current_guard["canvas"]["revision"].clone(), message, None));
|
||||
}
|
||||
result
|
||||
}
|
||||
@ -1994,6 +2011,7 @@ mod tests {
|
||||
w.pi_request_scope["productProduction"] = json!(true);
|
||||
w.allow_apply = true;
|
||||
w.product_target_hidden = true;
|
||||
w.pi_canvas_basis = app.session.active().map(|state| state.doc.clone());
|
||||
if archived {
|
||||
w.template_workflow["slots"][0]["candidates"][0]["sourceType"] = json!("archived-candidate");
|
||||
w.template_workflow["slots"][0]["candidates"][0]["reusedFrom"] = json!({"candidateId":"closed-source"});
|
||||
|
||||
@ -1,67 +1,67 @@
|
||||
# 小壹 Harness 当前状态
|
||||
|
||||
开发线 `codex/xiaoyi-whole-detail-fidelity`。2026-11-26 从 [实施记录](./implementation.md) 接续。逐项证据见 [验收矩阵](./acceptance.md)。
|
||||
|
||||
## 架构 1.2 整合与原结果过期 · 2026-11-26
|
||||
|
||||
- 六条架构分支已合入开发线。首张模板画布须通过映射和保存修订校验,目录读取可等待,失败后仍可用原 Pi 回合重开。商品规格与备注进入首次及分输出计划,空 `retryOf` 在冻结前省略。
|
||||
- 正式生图的原结果 GET 返回 HTTP 410 且同号查询确认成功、无保留结果时,原请求记为 `expired`。任务、候选和项目账本保存网关原号及过期回执,图位可另备新单。超时、断连、429 和 5xx 保留原请求待核查。
|
||||
- 本地 Pi 全量 313 项、Docker Skill 5 项、Rust 后端 118 项、原生 UI 90 项通过。Rust 有 15 项标记忽略,31 个 crate 的分层检查通过。
|
||||
- 阶段 1 使用本地回归与 debug 构建验证,R28 原工程的实机结果见阶段 2。
|
||||
|
||||
## R28 阶段 2 · QA-SZ012616
|
||||
|
||||
- 基线 `aa4c9868`,隔离工程 `35a93e64-4a06-456c-a2c9-0f5617cb3428`。启动后按原号查询 M02-I01,结果 HTTP 410,幂等查询 HTTP 200 且成功结果已不可取。原任务及候选记为 `expired`,SQLite 保留原号并释放图位。
|
||||
- M02-I01 新网关号 `b503c6e3-df12-480f-85f5-255fc3c03e5c` 从冻结到接收耗时 73 秒,真实 PNG 2048 × 2048,验图通过后回填原生画布。M01-I01 返工号 `f446a3ec-2c61-4fe6-b737-23320fe3c07f` 耗时 81 秒并返回 2048 × 2048 PNG,验图要求继续调整机位和使用场景。下一笔返工 `2e23f1d0-50bc-4318-8eb8-2fa9bd37f64c` 按原号查询后归入 `expired`。
|
||||
- `e15a1692` 支持 Windows 深路径上的项目 SQLite。`704937bf` 用持久准备回执取得请求版本与哈希,制作或验图进行中时继续当前输出。`3dbf28f4` 在原生明确返回未写入时等待画布,再提交原字段条件。
|
||||
- `fd8c6473` 将受审候选放在首位并标记每张图的角色。`26937292` 把发布映射的当格填写要求与整屏上下文分开。M05-I03、M05-I05 的旧回执与原 PNG 可见内容有出入。M05-I03 保留原候选号 `d6a99c3a-041e-4fd3-b3d7-ce023f49b236`,复审确认桌腿结构近景通过。`stage-2-review-identity-evidence.json`、`stage-2-review-after-fix.json`
|
||||
- 验图附件角色调整后的 Node 回归 171 项通过,图位要求分离后的 Node 定向 34 项和 Rust 定向 4 项通过。原号恢复 Rust 4 项及原生写入 2 项通过。指定 Cargo 目录的 debug 构建通过。主图映射的 20 格文案实际写入修订 3,零拒绝、零版式警告。M02-I01 与 M05-I03 的采用有原生回执。
|
||||
- 阶段 2 实机约 96 分钟,新增 17 笔真实生图,16 张 PNG,1 笔结果过期,未知结果 0。最后一轮约 20 分 52 秒,模型网关返回 HTTP 429 `insufficient_quota` 后保存主图草稿。主图和详情均无正式导出,详情独立续跑待额度恢复。`stage-2-metrics.json`、`stage-2-quota-blocker.json`
|
||||
- 已交付的 SKU 位于 `generation-8DZ9BF`。独立客户端重开 JPG 与 `.pcraft` 均为 1440 × 1440,1 个图位及 4 个文案字段通过,两文件的字节数与 SHA-256 对照续跑前快照一致。已退出验收和核验客户端,相关进程余数为 0。运行与回执证据见 [R28 验收目录](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28>)。
|
||||
|
||||
## R28 实机 · QA-SZ012616 · 2026-11-26
|
||||
|
||||
- 隔离配置的素材库返回 HTTP 200。顾家电脑桌资源组的 `visual_guides` 发布版本为 `001e54ccc1584383a70630e218e20ddd`,15 份指引和 4 份附件。Pi 使用同一套资源分别绑定详情、主图和 SKU,每类实际加载 4 个 Skill。
|
||||
- `13bec4f3` 将首张有映射的模板画布装入新项目编辑器,避免空占位画布继续触发作用域失效。保存落定后,原 Pi 回合取得绑定回执。首张画布定向回归 1 项、原生整套制作回归 8 项、Pi 回归 278 项通过。
|
||||
- `5c5bf1ee` 将工程保存的规格和备注纳入首次及分输出制作计划。`f172172d` 省略生图准备中的空 `retryOf`,真实原编号继续由原生端验证。Pi 全量 278 项及生图准备定向 8 项通过。
|
||||
- 隔离工程 `35a93e64-4a06-456c-a2c9-0f5617cb3428` 选用 PhotoCraft 原生合成,三类图使用同一花色,只参考原 PS 图片构图,预算 90 分钟。同一工程累计 27 分 29 秒,最后一轮续做 17 分 25 秒。SKU、详情、主图分别收到 15、6、63 笔模型回执。
|
||||
- 正式交付为 SKU 的 1 份 JPG 和 1 份可编辑稿,均独立重开为 1440 × 1440。详情在读取 49 格文案字段后被 Pi 保留为草稿。主图有 7 笔成功生成,M01 需返工,M02-I01 的网关原编号 `e11a6468-ea65-49d0-a4ec-2a0ca5bae738` 返回成功状态,但原结果连续三次 HTTP 410。
|
||||
- 隔离窗口已关闭,进程数为 0。恢复 M02-I01 原结果后可在同一工程续做,保留已导出的 SKU。预检、耗时、首笔生图及导出核验见 [R28](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28>)。
|
||||
|
||||
## T3 Code 接手 · 2026-11-26 15:45(北京时间)
|
||||
|
||||
- 先读 [实施记录](./implementation.md) 的任务 4–5 和 [验收矩阵](./acceptance.md) 的 P03/A03。代码基线为 `f79aed2e285852ed1224cf27e2e208eba683740a`,冻结请求提交为 `f3fee2dc`。原有三份文档的未提交内容留在工作树。
|
||||
- 顾家电脑桌正式模板三类组件在 R28 本地发布快照均有 `enterprise.resourceSetId`,均无 `skillSources`,从资源组读取 Skill。当前 Pin 确认范围为该商品套件。
|
||||
- [顶层冻结入口](../../../apps/detail-agent-pi/src/production-operations.mjs#L541) 仍直接转发。子代理会先读并核对图位。PhotoCraft 已对两个入口共用的原始请求校验账户、项目、输出、花色与 revision/hash。顶层 Node 显式绑定核对待接手。
|
||||
- 275 项 Node、32 项原生画布命令、8 项输出、4 项原生图片回归通过。15:44:57 生成 [原生 debug 客户端](<D:/DevCaches/xiaoyi-d01-production-target/debug/photocraft.exe>)。GUI 编译提示缺少 Windows 图标及版本资源。相关验收窗口、构建和脚本均已退出。
|
||||
- 优先用 [R28 测试目录](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28>) 的 [QA-SZ012616 工程](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28/profile/jiansun/accounts/689e648d9ccc3c02f82d1a5321ddeacef41230d4f43ab227318e943fd01af8aa/projects/b33d34aa-1d29-48de-8bb0-c7f472f58988>)。五张实拍、正式三类模板、模拟规格与说明齐备。上轮 停 在画布连接,未派发,未形成三类正式文件。D01 的 [原始资料和成果](<D:/AI Code/gongxiangp2/output/codex-GBGJ-CY011401-baseline-20261118>) 可做对照。
|
||||
- [desk-run.mjs](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28/desk-run.mjs>) 提供 `launch`、`prepare`、`run`。需用隔离配置重新建立画布连接,然后单击制作。结算后用 [verify-export.mjs](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28/verify-export.mjs>) 逐个打开正式导出的文件。先验三类实际交付。旧桌面运行包不作本轮构建证据。
|
||||
- 当前卡点是隔离画布控制连接、最新冻结链路的实际供应商出站、旧模板固定规格与交付校验。只有实际导出且独立重开才算本轮通过。无新实机或付费调用。保留原请求按原号核查。
|
||||
|
||||
# 小壹 Harness 当前状态
|
||||
|
||||
开发线 `codex/xiaoyi-whole-detail-fidelity`。2026-11-26 从 [实施记录](./implementation.md) 接续。逐项证据见 [验收矩阵](./acceptance.md)。
|
||||
|
||||
## 架构 1.2 整合与原结果过期 · 2026-11-26
|
||||
|
||||
- 六条架构分支已合入开发线。首张模板画布须通过映射和保存修订校验,目录读取可等待,失败后仍可用原 Pi 回合重开。商品规格与备注进入首次及分输出计划,空 `retryOf` 在冻结前省略。
|
||||
- 正式生图的原结果 GET 返回 HTTP 410 且同号查询确认成功、无保留结果时,原请求记为 `expired`。任务、候选和项目账本保存网关原号及过期回执,图位可另备新单。超时、断连、429 和 5xx 保留原请求待核查。
|
||||
- 本地 Pi 全量 313 项、Docker Skill 5 项、Rust 后端 118 项、原生 UI 90 项通过。Rust 有 15 项标记忽略,31 个 crate 的分层检查通过。
|
||||
- 阶段 1 使用本地回归与 debug 构建验证,R28 原工程的实机结果见阶段 2。
|
||||
|
||||
## R28 阶段 2 · QA-SZ012616
|
||||
|
||||
- 基线 `aa4c9868`,隔离工程 `35a93e64-4a06-456c-a2c9-0f5617cb3428`。启动后按原号查询 M02-I01,结果 HTTP 410,幂等查询 HTTP 200 且成功结果已不可取。原任务及候选记为 `expired`,SQLite 保留原号并释放图位。
|
||||
- M02-I01 新网关号 `b503c6e3-df12-480f-85f5-255fc3c03e5c` 从冻结到接收耗时 73 秒,真实 PNG 2048 × 2048,验图通过后回填原生画布。M01-I01 返工号 `f446a3ec-2c61-4fe6-b737-23320fe3c07f` 耗时 81 秒并返回 2048 × 2048 PNG,验图要求继续调整机位和使用场景。下一笔返工 `2e23f1d0-50bc-4318-8eb8-2fa9bd37f64c` 按原号查询后归入 `expired`。
|
||||
- `e15a1692` 支持 Windows 深路径上的项目 SQLite。`704937bf` 用持久准备回执取得请求版本与哈希,制作或验图进行中时继续当前输出。`3dbf28f4` 在原生明确返回未写入时等待画布,再提交原字段条件。
|
||||
- `fd8c6473` 将受审候选放在首位并标记每张图的角色。`26937292` 把发布映射的当格填写要求与整屏上下文分开。M05-I03、M05-I05 的旧回执与原 PNG 可见内容有出入。M05-I03 保留原候选号 `d6a99c3a-041e-4fd3-b3d7-ce023f49b236`,复审确认桌腿结构近景通过。`stage-2-review-identity-evidence.json`、`stage-2-review-after-fix.json`
|
||||
- 验图附件角色调整后的 Node 回归 171 项通过,图位要求分离后的 Node 定向 34 项和 Rust 定向 4 项通过。原号恢复 Rust 4 项及原生写入 2 项通过。指定 Cargo 目录的 debug 构建通过。主图映射的 20 格文案实际写入修订 3,零拒绝、零版式警告。M02-I01 与 M05-I03 的采用有原生回执。
|
||||
- 阶段 2 实机约 96 分钟,新增 17 笔真实生图,16 张 PNG,1 笔结果过期,未知结果 0。最后一轮约 20 分 52 秒,模型网关返回 HTTP 429 `insufficient_quota` 后保存主图草稿。主图和详情均无正式导出,详情独立续跑待额度恢复。`stage-2-metrics.json`、`stage-2-quota-blocker.json`
|
||||
- 已交付的 SKU 位于 `generation-8DZ9BF`。独立客户端重开 JPG 与 `.pcraft` 均为 1440 × 1440,1 个图位及 4 个文案字段通过,两文件的字节数与 SHA-256 对照续跑前快照一致。已退出验收和核验客户端,相关进程余数为 0。运行与回执证据见 [R28 验收目录](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28>)。
|
||||
|
||||
## R28 实机 · QA-SZ012616 · 2026-11-26
|
||||
|
||||
- 隔离配置的素材库返回 HTTP 200。顾家电脑桌资源组的 `visual_guides` 发布版本为 `001e54ccc1584383a70630e218e20ddd`,15 份指引和 4 份附件。Pi 使用同一套资源分别绑定详情、主图和 SKU,每类实际加载 4 个 Skill。
|
||||
- `13bec4f3` 将首张有映射的模板画布装入新项目编辑器,避免空占位画布继续触发作用域失效。保存落定后,原 Pi 回合取得绑定回执。首张画布定向回归 1 项、原生整套制作回归 8 项、Pi 回归 278 项通过。
|
||||
- `5c5bf1ee` 将工程保存的规格和备注纳入首次及分输出制作计划。`f172172d` 省略生图准备中的空 `retryOf`,真实原编号继续由原生端验证。Pi 全量 278 项及生图准备定向 8 项通过。
|
||||
- 隔离工程 `35a93e64-4a06-456c-a2c9-0f5617cb3428` 选用 PhotoCraft 原生合成,三类图使用同一花色,只参考原 PS 图片构图,预算 90 分钟。同一工程累计 27 分 29 秒,最后一轮续做 17 分 25 秒。SKU、详情、主图分别收到 15、6、63 笔模型回执。
|
||||
- 正式交付为 SKU 的 1 份 JPG 和 1 份可编辑稿,均独立重开为 1440 × 1440。详情在读取 49 格文案字段后被 Pi 保留为草稿。主图有 7 笔成功生成,M01 需返工,M02-I01 的网关原编号 `e11a6468-ea65-49d0-a4ec-2a0ca5bae738` 返回成功状态,但原结果连续三次 HTTP 410。
|
||||
- 隔离窗口已关闭,进程数为 0。恢复 M02-I01 原结果后可在同一工程续做,保留已导出的 SKU。预检、耗时、首笔生图及导出核验见 [R28](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28>)。
|
||||
|
||||
## T3 Code 接手 · 2026-11-26 15:45(北京时间)
|
||||
|
||||
- 先读 [实施记录](./implementation.md) 的任务 4–5 和 [验收矩阵](./acceptance.md) 的 P03/A03。代码基线为 `f79aed2e285852ed1224cf27e2e208eba683740a`,冻结请求提交为 `f3fee2dc`。原有三份文档的未提交内容留在工作树。
|
||||
- 顾家电脑桌正式模板三类组件在 R28 本地发布快照均有 `enterprise.resourceSetId`,均无 `skillSources`,从资源组读取 Skill。当前 Pin 确认范围为该商品套件。
|
||||
- [顶层冻结入口](../../../apps/detail-agent-pi/src/production-operations.mjs#L541) 仍直接转发。子代理会先读并核对图位。PhotoCraft 已对两个入口共用的原始请求校验账户、项目、输出、花色与 revision/hash。顶层 Node 显式绑定核对待接手。
|
||||
- 275 项 Node、32 项原生画布命令、8 项输出、4 项原生图片回归通过。15:44:57 生成 [原生 debug 客户端](<D:/DevCaches/xiaoyi-d01-production-target/debug/photocraft.exe>)。GUI 编译提示缺少 Windows 图标及版本资源。相关验收窗口、构建和脚本均已退出。
|
||||
- 优先用 [R28 测试目录](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28>) 的 [QA-SZ012616 工程](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28/profile/jiansun/accounts/689e648d9ccc3c02f82d1a5321ddeacef41230d4f43ab227318e943fd01af8aa/projects/b33d34aa-1d29-48de-8bb0-c7f472f58988>)。五张实拍、正式三类模板、模拟规格与说明齐备。上轮 停 在画布连接,未派发,未形成三类正式文件。D01 的 [原始资料和成果](<D:/AI Code/gongxiangp2/output/codex-GBGJ-CY011401-baseline-20261118>) 可做对照。
|
||||
- [desk-run.mjs](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28/desk-run.mjs>) 提供 `launch`、`prepare`、`run`。需用隔离配置重新建立画布连接,然后单击制作。结算后用 [verify-export.mjs](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-synthetic-production-r28/verify-export.mjs>) 逐个打开正式导出的文件。先验三类实际交付。旧桌面运行包不作本轮构建证据。
|
||||
- 当前卡点是隔离画布控制连接、最新冻结链路的实际供应商出站、旧模板固定规格与交付校验。只有实际导出且独立重开才算本轮通过。无新实机或付费调用。保留原请求按原号核查。
|
||||
|
||||
## 当前顺序 · 架构实现优先
|
||||
|
||||
沿总体架构 1.2 完成 Pi 和 PhotoCraft 的接口、资源和运行生命周期。端到端无人值守验收后置。每块先用本地回归和原生构建核对实际入口。
|
||||
|
||||
## 架构 1.2 纠偏 · 任务 1–2 · 2026-11-26
|
||||
|
||||
- `6282c0c3` 生产目标和首次上下文由本轮 `requestedOutputs` 产生。Pi 用 `open_production_output` 在原回合打开第一张工作画布。PhotoCraft 沿用模板打开与保存链路,收到实际保存回执后更新工作画布绑定。后续输出通过提交当前成果时的 `nextOutput` 交接到同一 Pi 会话。
|
||||
- `0adb3874` 从正式制作移出 3,137 行旧流水线,保留已存在的旧工程入口并按需加载。生产工具取消 10 个重叠入口,主要操作由原生命令、制作、项目资料和企业资源工具承接。`production-slots.mjs` 复用 18 行图位分页读取。
|
||||
- 任务 1 的 56 项 Pi 定向、10 项原生 UI 工作区回归、19 项原生应用回归通过,另有 3 项依赖历史工程的测试标记忽略。任务 2 的 Pi 全量 275 项通过,最终定向 4 项通过。原生 debug 构建通过,有 2 个既有未使用项警告。证据 `batch-09/architecture-correction-20261126/`。
|
||||
- 无人值守实机验收后置。
|
||||
|
||||
## 架构 1.2 纠偏 · 任务 3 · 桥接错误与操作状态
|
||||
|
||||
- `d3291615` 账户与项目下的原操作恢复、当前回合写入和单张图片的执行使用显式状态。图位操作携带自己的状态,原号仍入项目账本。删除代理属性劫持、原型遮蔽和跨项目的核查数量限制。
|
||||
- Node/Rust 原生桥接传递 `category`、`retryable`、`dispatched`、`message`。模型桥中断、项目切换、写入已撤销及验图 HTTP 状态的判断使用结构化信息。模板资源读取仍沿用既有字符串错误入口。
|
||||
- Pi 全量 275 项和最终定向 35 项通过。原生应用定向 48 项、UI 定向 26 项通过,原生 debug 构建成功。扩大的 UI 套件仍能复现三项历史基线失败,扩大的应用套件三项规则用例缺少本机环境参数。详见 `batch-09/architecture-correction-20261126/`。
|
||||
|
||||
## 架构 1.2 纠偏 · 任务 4–5 · 正式生图与规则归属
|
||||
|
||||
- `f3fee2dc` 正式生图持久准备,回读完整文本、模型参数、真实参考顺序和文件摘要,按版本与内容 hash 冻结。主 Pi 与子代理均只按冻结 ID 派发。已派发的候选继续使用原编号核查。时间轴用结构化错误分类,后台预加载读取模板回执声明的输出。
|
||||
- `f79aed2e` 生产 Skill 来自模板发布的 `skill_sources` 或所选资源组的 `visual_guides`,依项目版本读取。验图代理按发布规则提交结论,客户端提供候选、画布预览、确定性像素信息和结构化回执。默认模板写入保护原有未映射图层,支持已映射字段与新增层。
|
||||
- 本地 Pi 275 项、原生画布命令 32 项、输出交接与预加载 8 项、原生请求与原号 4 项通过。原生 debug 构建成功。证据 `batch-09/frozen-image-request-20261126/`。
|
||||
- 正式供应商接收的请求与真实企业模板新成品待验。本批未执行无人值守全流程。
|
||||
|
||||
## 架构 1.2 纠偏 · 任务 1–2 · 2026-11-26
|
||||
|
||||
- `6282c0c3` 生产目标和首次上下文由本轮 `requestedOutputs` 产生。Pi 用 `open_production_output` 在原回合打开第一张工作画布。PhotoCraft 沿用模板打开与保存链路,收到实际保存回执后更新工作画布绑定。后续输出通过提交当前成果时的 `nextOutput` 交接到同一 Pi 会话。
|
||||
- `0adb3874` 从正式制作移出 3,137 行旧流水线,保留已存在的旧工程入口并按需加载。生产工具取消 10 个重叠入口,主要操作由原生命令、制作、项目资料和企业资源工具承接。`production-slots.mjs` 复用 18 行图位分页读取。
|
||||
- 任务 1 的 56 项 Pi 定向、10 项原生 UI 工作区回归、19 项原生应用回归通过,另有 3 项依赖历史工程的测试标记忽略。任务 2 的 Pi 全量 275 项通过,最终定向 4 项通过。原生 debug 构建通过,有 2 个既有未使用项警告。证据 `batch-09/architecture-correction-20261126/`。
|
||||
- 无人值守实机验收后置。
|
||||
|
||||
## 架构 1.2 纠偏 · 任务 3 · 桥接错误与操作状态
|
||||
|
||||
- `d3291615` 账户与项目下的原操作恢复、当前回合写入和单张图片的执行使用显式状态。图位操作携带自己的状态,原号仍入项目账本。删除代理属性劫持、原型遮蔽和跨项目的核查数量限制。
|
||||
- Node/Rust 原生桥接传递 `category`、`retryable`、`dispatched`、`message`。模型桥中断、项目切换、写入已撤销及验图 HTTP 状态的判断使用结构化信息。模板资源读取仍沿用既有字符串错误入口。
|
||||
- Pi 全量 275 项和最终定向 35 项通过。原生应用定向 48 项、UI 定向 26 项通过,原生 debug 构建成功。扩大的 UI 套件仍能复现三项历史基线失败,扩大的应用套件三项规则用例缺少本机环境参数。详见 `batch-09/architecture-correction-20261126/`。
|
||||
|
||||
## 架构 1.2 纠偏 · 任务 4–5 · 正式生图与规则归属
|
||||
|
||||
- `f3fee2dc` 正式生图持久准备,回读完整文本、模型参数、真实参考顺序和文件摘要,按版本与内容 hash 冻结。主 Pi 与子代理均只按冻结 ID 派发。已派发的候选继续使用原编号核查。时间轴用结构化错误分类,后台预加载读取模板回执声明的输出。
|
||||
- `f79aed2e` 生产 Skill 来自模板发布的 `skill_sources` 或所选资源组的 `visual_guides`,依项目版本读取。验图代理按发布规则提交结论,客户端提供候选、画布预览、确定性像素信息和结构化回执。默认模板写入保护原有未映射图层,支持已映射字段与新增层。
|
||||
- 本地 Pi 275 项、原生画布命令 32 项、输出交接与预加载 8 项、原生请求与原号 4 项通过。原生 debug 构建成功。证据 `batch-09/frozen-image-request-20261126/`。
|
||||
- 正式供应商接收的请求与真实企业模板新成品待验。本批未执行无人值守全流程。
|
||||
|
||||
## 阶段 D · Pi 选定首张工作画布
|
||||
|
||||
- `f74b4641` 一键启动先保存产品资料并准备模板资源,PhotoCraft 提供本轮可制作的输出和花色。主 Pi 会话读取当前项目发布的 Skill,调用 `choose_first_output` 提交首项。客户端记录选择,再打开、绑定和保存该画布,之后由同一个 Pi 目标继续。
|
||||
@ -89,126 +89,126 @@
|
||||
- 31 分 14 秒结束本地观察,尚无新增采用。落盘图位为详情 25/27、主图 9/10、SKU 0/1,正式导出各 0。详情仍含未处理的固定材质和尺寸,主图未收到文案写权,SKU 未进入制作。已保留原请求。证据 `batch-09/phase-02-rework-20261126/` 的 `run-evidence.json`、`real-run-metrics.json` 和 `runtime-tool-evidence.json`。
|
||||
- `c01865ca` 按架构阶段 C 收口停止生命周期。用户停止和预算到期通过已有原生桥通知 Pi 停止,Pi 子代理使用同一停止信号。模拟在途子代理确认不再重试,画布停止和截止各有定向原生回归。正式旧请求保持可核查。
|
||||
|
||||
## 第一阶段 · 验图与原生修图框
|
||||
|
||||
小壹验图按同款结构与花色、模板图位的画面类型与调性判断。回执列出「必须重做」和「可用画布处理」,附具体位置和建议。只涉及图文、版式或交付规格时,先采用,再按 Skill 用 PhotoCraft 原生命令调整,最后查看实际图框。
|
||||
|
||||
- 最终代码的 Pi 回归 274 项通过。规则与 Skill 提交 `16395a90`、`51f502c2`。
|
||||
- 20 张旧退回候选已对照实际留存图、原片和冻结模板参考。结构问题和图位类型问题各 1 张须重做,其余 18 张可先采用、在画布处理。10 条旧文字描述与同编号存档像素不符。抽样未发起生图。
|
||||
- 正式实机仅启动一次,使用 R22 草稿的独立副本,原生构建 `cbe66a92`、Pi 实机版本 `16395a90`。首次采用 10 分 02 秒。新增验图 1/2 通过(50%)。两张均返回画布处理建议,其中一张还被判必须重做。
|
||||
- 45 分 04 秒观察到客户端按项目预算结算。详情落盘采纳从 23/27 到 25/27(92.6%),其中一张技术截面替代图验图未通过,仍留草稿;主图从 9/10 到 10/10(100%);SKU 0/1(0%),未进入制作。三类可交付文件各 0。详情固定材质文字、旧尺寸和未完成图位仍待处理;主图未在时限内提交。原请求保留,按原号核查。
|
||||
- 实机暴露了主代理把已退回的技术截面替代图直接采入草稿。收口为先按模板许可更新主题和图文要求,重验通过后再采用。返工建议须以本款实拍及确认资料为依据。此收口经过本地 274 项测试;实机按本阶段单次验收记录,不重复启动。
|
||||
|
||||
证据在 `batch-09/phase-01-review-20261126/`。逐图结论见 `old-candidate-rereview.md`,旧回执及像素来源见同名 JSON。真实运行和落盘图位见 `run-evidence.json`、`real-run-metrics.json`。
|
||||
|
||||
| 里程碑 | 当前状态 |
|
||||
| --- | --- |
|
||||
| 1 顾家电脑桌详情页无人值守实际导出 | R12 从同一草稿继续,保存 30 格新文案并累计采用 2 张图。仍有未校正的旧规格和标线。正式导出 0 |
|
||||
| 2 同一轮电脑桌主图与 SKU | R7 单击后自动交接三类。SKU JPG 与可编辑稿各 1 份,均已打开,规格栏按模板留空并有回执。主图 20/20 格已落盘,采用图 2 张,正式导出 0 |
|
||||
| 3 同代码椅子 D01 三类交付 | 固定素材保真已分别核验。电脑桌完整交付后启动 D01 无人值守验收 |
|
||||
| 4 阶段 D/E 余项与 P01–P15 | 原会话目标和画布交接已有回归。按 [验收矩阵](./acceptance.md) 接续 |
|
||||
| 5 两个样本 A28 通过 | 未达成 |
|
||||
|
||||
## 第二轮 · 2026-11-26
|
||||
|
||||
先用顾家电脑桌独立实机做完详情、主图、SKU,再用同一构建验 D01。两套生产验收完成前,暂停阶段 D 余项和 P 系列工作。
|
||||
|
||||
| 里程碑 | 当前状态 |
|
||||
| --- | --- |
|
||||
| 1 顾家电脑桌详情 | R22 从历史草稿副本续跑,新采纳 21 次。Agent 发现旧尺寸、材质宣传和缺图,保存详情草稿并自动交接 |
|
||||
| 2 同轮主图和 SKU | 自动转到主图,新采纳 4 次。45 分钟预算结束,SKU 未进画布,三类正式导出均为 0 |
|
||||
| 3 同代码餐椅 D01 | 未执行,等电脑桌三类完整验收 |
|
||||
| 4 阶段 D、A28–A30、P01–P15 | 等前三项,保留前轮证据 |
|
||||
| 5 两样本 A28 | 未达成 |
|
||||
|
||||
R22 使用本机原生构建 `17e2de76`、Pi `0641e8e7`,实际路线选择 GPT‑6.1 Sol 与 Sunburst。已从隔离客户端单次启动。画布首次就绪 43.290 秒,第一笔模型准备 9.758 秒,首次采纳 6 分 05 秒。新采纳操作详情 21 次、主图 4 次。验图通过 26/30,须重做 4,带画布建议 30,原话相同的同图位重复退回 0,顶层工具错误 0。主代理输入中位 146,036、最大 268,206 token,主、子代理按输入计缓存命中率 72.5% 和 47.6%。共 177 个模型准备事件、168 个结束回执,45 分 18 秒时观察到客户端预算结算。账户和原请求按原作用域保留。证据 `batch-09/desk-review-priority-r22/run-evidence.json`、`r22-metrics.json` 和 `export-verification.json`。
|
||||
|
||||
- `2681fa0e` 验图只把同款商品与图位调性作为退回依据。回执记录必须重做和画布处理的位置与建议。
|
||||
- `522edbe8` 商品素材 Skill 指明同款同调性素材先采用,再用 PhotoCraft 原生命令修图框和文案,处理后看实际画布。
|
||||
- `0641e8e7` 子代理同类共享 Pi 会话键、使用 SDK 默认并行。回环 Responses 捕获同类键相同、异类不同。出站事件保留缓存键是否存在,无原值。
|
||||
- 7 场 145 条历史回执已定位,113 条退回。67 条的静态标记实际是商品结构和颜色通过。回执文字分出 34 条仅需画布处理、25 条明确调性或画面类型不符、1 条明确改了商品结构、7 条需重看实际主候选。回放限于旧回执,未重新验图。证据 `batch-09/desk-review-priority-r22/historical-review-replay.json`。
|
||||
- R12 主代理两笔缓存请求相隔 83 秒,缓存从 198,528 token 降至 0,客户端实际出站键、工具和系统指令相同,序列化输入公共前缀 3,574,280 字符。Relay 按原编号核对,6 笔均在同一 ToAPIs Responses 线路各派发 1 次,4 笔留存结束帧明确返回缓存 0。用 Relay 生产版本 080f1e177348 隔离模拟 Responses,经真实解析、预检、两条线路 HTTPS 转发后都保留缓存键。Relay 还发现只做 Schema 校验的直通线路会重新编码请求,已在本地验证原字节透传,尚未发布。生产另一组 134 笔同线路结算中 111 笔命中、23 笔为零。历史实际出站键及同前缀逐笔比对未留证,不能将零命中归因于该重编码或 ToAPIs 内部。证据 `batch-09/desk-review-priority-r22/cache-prefix-comparison.json` 和 `relay-responses-cache-release.log`。
|
||||
- 4 项 Node 定向、273 项 Pi 回归通过。新增运行限制 0 项。
|
||||
- `43acd1ee` 返工子代理读取被退回的像素、验图原话、上次实际生图提示词和下一次尝试序号。可显式停止模板构图及提示注入,继续使用同款实拍。8 项 Node 定向与 63 项原生画布回归通过。实际返工请求待本轮后续构建验证。
|
||||
- `54df18b0` 主代理生图立即返回受理,验图默认不等待。运行中或已归档待核查的候选按原号获取结果。测试里并行写文案完成,生图仍在等待,无第二笔派发。8 项定向通过。
|
||||
|
||||
- `45f9f420` 进度默认逐图位一行,计划默认索引。指定图位再读详细规则和提示词。同一输出复用先前参考图。读屏使用 Pi 的图片缩放。44 项定向测试、274 项全量回归通过。
|
||||
- `af46f80f` 制作时限随项目保存,启动区显示当前分钟数,检查点保存本轮期限。旧项目默认 45 分钟。原生构建成功,制作回归 7 项通过。
|
||||
- `cbe66a92` 目标文字和作用域未变时,写入工具刷新修订并继续。用户改过的文字保留。查同款历史时,完成图可交给当前图位复核。44 项定向、274 项 Pi 回归、63 项原生画布回归通过。另在隔离副本复用了不同图位的真实候选,原请求归档未改,新增付费 0。
|
||||
|
||||
R28 用顾家正式模板和原实拍,新建隔离的 QA-SZ012616 工程。按用户授权使用模拟规格和说明,选用 90 分钟预算。规划、规则读取、制作和导出走实际生产入口。验收脚本按输出打开真实文件并逐格核对。证据目录 `batch-09/desk-synthetic-production-r28/`。
|
||||
|
||||
## 实机运行一览
|
||||
|
||||
| 样本与构建 | 实机执行 | 详情、主图、SKU | 工具拒绝 |
|
||||
| --- | --- | --- | --- |
|
||||
| 顾家电脑桌 `2a337a42` | 一次启动,约 23 分钟后停止。证据 `batch-09/desk-acceptance/` | 0、0、0 | 3 次。旧工具批量上限 16、整屏复核字段格式、原生只读 `document.inspect` 被错误认作写入 |
|
||||
| 顾家电脑桌 `4341a378` | 一次启动,观察约 17 分钟后检测不到窗口。证据 `batch-09/desk-read-only/` | 0、0、0 | 1 次。读取图位时空数组被旧 schema 拒绝 |
|
||||
| 顾家电脑桌 `545ebbae` | 独立窗口最后读数 25 分 26 秒,仍在详情制作。随后窗口进程退出,观察链路无法连接,未定位退出来源。证据 `batch-09/desk-reviewer-verdict/` | 0、0、0 | 已确认 2 次。屏审阅要求匹配字段和旧策划模型工具声明不匹配 |
|
||||
| 顾家电脑桌原生 `3473c08d`、Agent `8b454f57` | 已准备窗口,真实往返测试发现点文本仍误报,关闭验收窗口。证据 `batch-09/desk-pi-direct/preparation-ended.json`、`desk-copy-native-roundtrip.log` | 未发起制作 | 未执行 |
|
||||
| 顾家电脑桌 `04d21340` | 只点一次,100.850 秒末次读数。约 104 秒后验收方正常关窗。`batch-09/desk-layout-r2/` | 0、0、0 | 457 次,旧模型桥第二份工具白名单/数量上限。无生图提交;一笔压缩推理原号保留 |
|
||||
| 顾家电脑桌 `eb10aa74` | 一次 `ui.click`,PID 53608。详情候选退回后保存草稿。主图批量验图后写入两格,已从可编辑稿核对。`batch-09/desk-transport-r3/` | 28 分 55 秒由 Pi 结算,0、0、0。独立检查 `export-verification.json` | 11 次工具错误。2 次越出项目目录,2 次层或分屏无匹配,2 次候选号无效,3 次图位无匹配,2 次写入暂不可用或修订需更新。工具名单拒绝 0 次 |
|
||||
| 顾家电脑桌原生 `eb10aa74`、Agent `34e6d8db` | `batch-09/desk-scene-source-r4/`,隔离窗口一次启动。40 分 49 秒由 Pi 结束,实际通过场景生成、后台验图、三类写入及主图和 SKU 回填。 | 0、0、0,逐类独立核对 | 4 次。1 次图层/分屏无匹配,2 次独立图位被项目恢复队列误拦,1 次模板参考 HTTP 415 |
|
||||
| 顾家电脑桌 R5 `079cd816` | 32 分 31 秒由 Pi 自行结束。原项目仅续跑一次,详情及主图保存草稿,SKU 保存并导出。 `batch-09/desk-slot-isolation-r5/` | JPG 数 0、0、1。SKU 的 1440 × 1440 JPG 和可编辑稿已独立打开,规格栏模板内容检查未过 | 5 次工具错误。1 原操作只存在旧进程,2 层查询丢失合用筛选条件,1 旧工具误报用户接手,1 后续原生命令被该错误阻断 |
|
||||
| 顾家电脑桌 R6 `327e2b30` | 同项目一次续跑,45 分 12 秒由预算结算。两次原生命令隐藏旧商品标注,实际落盘。四笔未知生图均保持原号。 `batch-09/desk-reconcile-r6/` | 新增 0、0、0。原 SKU 文件仍可独立读取 | 3 次。两个失效分屏编号拒掉有效查询,另一次原生写请求返回修订变化,原因仍需确证。随后两条原生命令实际写入 |
|
||||
| 顾家电脑桌 R7 原生 `f101fda3`、Agent `4ee5a5b4` | 实际按钮仅提交一次,29 分 39 秒由 Pi 收尾。详情的推理准备失败后保留草稿,主图由 Pi 留稿,SKU 导出。 `batch-09/desk-published-copy-r7/` | JPG 数 0、0、1,另有 SKU 可编辑稿 1 份,实际打开和字段核验通过 | 2 次工具错误。画布暂不可写 1 次,跨画布图位查询 1 次。另有 85 条 Pi 推理重试事件,不计为工具拒绝 |
|
||||
| 顾家电脑桌 R8 `74aba6a7` | 一次启动,16 分 03 秒因模型传输和随后 TLS 握手失败结算。实际共 84 次模型请求准备,均使用本轮验证线路。详情写入 21 格,主图写入 20 格并采用两张图。 `batch-09/desk-verified-route-r8/` | 0、0、0,已核对正式出口 | 1 次。首个图位编号少一个字符导致旧工具中断批次。另有主代理推理连接错误 4 次和 SKU 握手错误 1 次 |
|
||||
| 顾家电脑桌 R9 `23976929` | 一次启动,45 分 22 秒由既有预算结算。详情 27 个图位成功分派,主代理 503 中断后留稿。主图实际落盘 20 格文案、5 张采用图并执行两次原生命令。 `batch-09/desk-batch-delegation-r9/` | 0、0、0。主图提交后检查确认 5 个图位仍缺,SKU 尚未启动 | 1 次。组合工具提交 6 层摘要,旧参数上限 3。另有 HTTP 503 纯推理失败 1 次 |
|
||||
| 顾家电脑桌 R10 `5216332c` | 一次启动,45 分 26 秒由预算结算。主代理遇到真实 HTTP 503 后由 Pi 重试成功。详情写入 49 格后留稿,主图交接沿用已验证线路。 `batch-09/desk-native-retry-r10/` | 0、0、0。详情无采用图,主图采用 3 张,SKU 未启动 | 3 次。原生批量命令无活动图层被拒 1 次,错误被标成未知后拦住 2 次后续操作 |
|
||||
## 第一阶段 · 验图与原生修图框
|
||||
|
||||
小壹验图按同款结构与花色、模板图位的画面类型与调性判断。回执列出「必须重做」和「可用画布处理」,附具体位置和建议。只涉及图文、版式或交付规格时,先采用,再按 Skill 用 PhotoCraft 原生命令调整,最后查看实际图框。
|
||||
|
||||
- 最终代码的 Pi 回归 274 项通过。规则与 Skill 提交 `16395a90`、`51f502c2`。
|
||||
- 20 张旧退回候选已对照实际留存图、原片和冻结模板参考。结构问题和图位类型问题各 1 张须重做,其余 18 张可先采用、在画布处理。10 条旧文字描述与同编号存档像素不符。抽样未发起生图。
|
||||
- 正式实机仅启动一次,使用 R22 草稿的独立副本,原生构建 `cbe66a92`、Pi 实机版本 `16395a90`。首次采用 10 分 02 秒。新增验图 1/2 通过(50%)。两张均返回画布处理建议,其中一张还被判必须重做。
|
||||
- 45 分 04 秒观察到客户端按项目预算结算。详情落盘采纳从 23/27 到 25/27(92.6%),其中一张技术截面替代图验图未通过,仍留草稿;主图从 9/10 到 10/10(100%);SKU 0/1(0%),未进入制作。三类可交付文件各 0。详情固定材质文字、旧尺寸和未完成图位仍待处理;主图未在时限内提交。原请求保留,按原号核查。
|
||||
- 实机暴露了主代理把已退回的技术截面替代图直接采入草稿。收口为先按模板许可更新主题和图文要求,重验通过后再采用。返工建议须以本款实拍及确认资料为依据。此收口经过本地 274 项测试;实机按本阶段单次验收记录,不重复启动。
|
||||
|
||||
证据在 `batch-09/phase-01-review-20261126/`。逐图结论见 `old-candidate-rereview.md`,旧回执及像素来源见同名 JSON。真实运行和落盘图位见 `run-evidence.json`、`real-run-metrics.json`。
|
||||
|
||||
| 里程碑 | 当前状态 |
|
||||
| --- | --- |
|
||||
| 1 顾家电脑桌详情页无人值守实际导出 | R12 从同一草稿继续,保存 30 格新文案并累计采用 2 张图。仍有未校正的旧规格和标线。正式导出 0 |
|
||||
| 2 同一轮电脑桌主图与 SKU | R7 单击后自动交接三类。SKU JPG 与可编辑稿各 1 份,均已打开,规格栏按模板留空并有回执。主图 20/20 格已落盘,采用图 2 张,正式导出 0 |
|
||||
| 3 同代码椅子 D01 三类交付 | 固定素材保真已分别核验。电脑桌完整交付后启动 D01 无人值守验收 |
|
||||
| 4 阶段 D/E 余项与 P01–P15 | 原会话目标和画布交接已有回归。按 [验收矩阵](./acceptance.md) 接续 |
|
||||
| 5 两个样本 A28 通过 | 未达成 |
|
||||
|
||||
## 第二轮 · 2026-11-26
|
||||
|
||||
先用顾家电脑桌独立实机做完详情、主图、SKU,再用同一构建验 D01。两套生产验收完成前,暂停阶段 D 余项和 P 系列工作。
|
||||
|
||||
| 里程碑 | 当前状态 |
|
||||
| --- | --- |
|
||||
| 1 顾家电脑桌详情 | R22 从历史草稿副本续跑,新采纳 21 次。Agent 发现旧尺寸、材质宣传和缺图,保存详情草稿并自动交接 |
|
||||
| 2 同轮主图和 SKU | 自动转到主图,新采纳 4 次。45 分钟预算结束,SKU 未进画布,三类正式导出均为 0 |
|
||||
| 3 同代码餐椅 D01 | 未执行,等电脑桌三类完整验收 |
|
||||
| 4 阶段 D、A28–A30、P01–P15 | 等前三项,保留前轮证据 |
|
||||
| 5 两样本 A28 | 未达成 |
|
||||
|
||||
R22 使用本机原生构建 `17e2de76`、Pi `0641e8e7`,实际路线选择 GPT‑6.1 Sol 与 Sunburst。已从隔离客户端单次启动。画布首次就绪 43.290 秒,第一笔模型准备 9.758 秒,首次采纳 6 分 05 秒。新采纳操作详情 21 次、主图 4 次。验图通过 26/30,须重做 4,带画布建议 30,原话相同的同图位重复退回 0,顶层工具错误 0。主代理输入中位 146,036、最大 268,206 token,主、子代理按输入计缓存命中率 72.5% 和 47.6%。共 177 个模型准备事件、168 个结束回执,45 分 18 秒时观察到客户端预算结算。账户和原请求按原作用域保留。证据 `batch-09/desk-review-priority-r22/run-evidence.json`、`r22-metrics.json` 和 `export-verification.json`。
|
||||
|
||||
- `2681fa0e` 验图只把同款商品与图位调性作为退回依据。回执记录必须重做和画布处理的位置与建议。
|
||||
- `522edbe8` 商品素材 Skill 指明同款同调性素材先采用,再用 PhotoCraft 原生命令修图框和文案,处理后看实际画布。
|
||||
- `0641e8e7` 子代理同类共享 Pi 会话键、使用 SDK 默认并行。回环 Responses 捕获同类键相同、异类不同。出站事件保留缓存键是否存在,无原值。
|
||||
- 7 场 145 条历史回执已定位,113 条退回。67 条的静态标记实际是商品结构和颜色通过。回执文字分出 34 条仅需画布处理、25 条明确调性或画面类型不符、1 条明确改了商品结构、7 条需重看实际主候选。回放限于旧回执,未重新验图。证据 `batch-09/desk-review-priority-r22/historical-review-replay.json`。
|
||||
- R12 主代理两笔缓存请求相隔 83 秒,缓存从 198,528 token 降至 0,客户端实际出站键、工具和系统指令相同,序列化输入公共前缀 3,574,280 字符。Relay 按原编号核对,6 笔均在同一 ToAPIs Responses 线路各派发 1 次,4 笔留存结束帧明确返回缓存 0。用 Relay 生产版本 080f1e177348 隔离模拟 Responses,经真实解析、预检、两条线路 HTTPS 转发后都保留缓存键。Relay 还发现只做 Schema 校验的直通线路会重新编码请求,已在本地验证原字节透传,尚未发布。生产另一组 134 笔同线路结算中 111 笔命中、23 笔为零。历史实际出站键及同前缀逐笔比对未留证,不能将零命中归因于该重编码或 ToAPIs 内部。证据 `batch-09/desk-review-priority-r22/cache-prefix-comparison.json` 和 `relay-responses-cache-release.log`。
|
||||
- 4 项 Node 定向、273 项 Pi 回归通过。新增运行限制 0 项。
|
||||
- `43acd1ee` 返工子代理读取被退回的像素、验图原话、上次实际生图提示词和下一次尝试序号。可显式停止模板构图及提示注入,继续使用同款实拍。8 项 Node 定向与 63 项原生画布回归通过。实际返工请求待本轮后续构建验证。
|
||||
- `54df18b0` 主代理生图立即返回受理,验图默认不等待。运行中或已归档待核查的候选按原号获取结果。测试里并行写文案完成,生图仍在等待,无第二笔派发。8 项定向通过。
|
||||
|
||||
- `45f9f420` 进度默认逐图位一行,计划默认索引。指定图位再读详细规则和提示词。同一输出复用先前参考图。读屏使用 Pi 的图片缩放。44 项定向测试、274 项全量回归通过。
|
||||
- `af46f80f` 制作时限随项目保存,启动区显示当前分钟数,检查点保存本轮期限。旧项目默认 45 分钟。原生构建成功,制作回归 7 项通过。
|
||||
- `cbe66a92` 目标文字和作用域未变时,写入工具刷新修订并继续。用户改过的文字保留。查同款历史时,完成图可交给当前图位复核。44 项定向、274 项 Pi 回归、63 项原生画布回归通过。另在隔离副本复用了不同图位的真实候选,原请求归档未改,新增付费 0。
|
||||
|
||||
R28 用顾家正式模板和原实拍,新建隔离的 QA-SZ012616 工程。按用户授权使用模拟规格和说明,选用 90 分钟预算。规划、规则读取、制作和导出走实际生产入口。验收脚本按输出打开真实文件并逐格核对。证据目录 `batch-09/desk-synthetic-production-r28/`。
|
||||
|
||||
## 实机运行一览
|
||||
|
||||
| 样本与构建 | 实机执行 | 详情、主图、SKU | 工具拒绝 |
|
||||
| --- | --- | --- | --- |
|
||||
| 顾家电脑桌 `2a337a42` | 一次启动,约 23 分钟后停止。证据 `batch-09/desk-acceptance/` | 0、0、0 | 3 次。旧工具批量上限 16、整屏复核字段格式、原生只读 `document.inspect` 被错误认作写入 |
|
||||
| 顾家电脑桌 `4341a378` | 一次启动,观察约 17 分钟后检测不到窗口。证据 `batch-09/desk-read-only/` | 0、0、0 | 1 次。读取图位时空数组被旧 schema 拒绝 |
|
||||
| 顾家电脑桌 `545ebbae` | 独立窗口最后读数 25 分 26 秒,仍在详情制作。随后窗口进程退出,观察链路无法连接,未定位退出来源。证据 `batch-09/desk-reviewer-verdict/` | 0、0、0 | 已确认 2 次。屏审阅要求匹配字段和旧策划模型工具声明不匹配 |
|
||||
| 顾家电脑桌原生 `3473c08d`、Agent `8b454f57` | 已准备窗口,真实往返测试发现点文本仍误报,关闭验收窗口。证据 `batch-09/desk-pi-direct/preparation-ended.json`、`desk-copy-native-roundtrip.log` | 未发起制作 | 未执行 |
|
||||
| 顾家电脑桌 `04d21340` | 只点一次,100.850 秒末次读数。约 104 秒后验收方正常关窗。`batch-09/desk-layout-r2/` | 0、0、0 | 457 次,旧模型桥第二份工具白名单/数量上限。无生图提交;一笔压缩推理原号保留 |
|
||||
| 顾家电脑桌 `eb10aa74` | 一次 `ui.click`,PID 53608。详情候选退回后保存草稿。主图批量验图后写入两格,已从可编辑稿核对。`batch-09/desk-transport-r3/` | 28 分 55 秒由 Pi 结算,0、0、0。独立检查 `export-verification.json` | 11 次工具错误。2 次越出项目目录,2 次层或分屏无匹配,2 次候选号无效,3 次图位无匹配,2 次写入暂不可用或修订需更新。工具名单拒绝 0 次 |
|
||||
| 顾家电脑桌原生 `eb10aa74`、Agent `34e6d8db` | `batch-09/desk-scene-source-r4/`,隔离窗口一次启动。40 分 49 秒由 Pi 结束,实际通过场景生成、后台验图、三类写入及主图和 SKU 回填。 | 0、0、0,逐类独立核对 | 4 次。1 次图层/分屏无匹配,2 次独立图位被项目恢复队列误拦,1 次模板参考 HTTP 415 |
|
||||
| 顾家电脑桌 R5 `079cd816` | 32 分 31 秒由 Pi 自行结束。原项目仅续跑一次,详情及主图保存草稿,SKU 保存并导出。 `batch-09/desk-slot-isolation-r5/` | JPG 数 0、0、1。SKU 的 1440 × 1440 JPG 和可编辑稿已独立打开,规格栏模板内容检查未过 | 5 次工具错误。1 原操作只存在旧进程,2 层查询丢失合用筛选条件,1 旧工具误报用户接手,1 后续原生命令被该错误阻断 |
|
||||
| 顾家电脑桌 R6 `327e2b30` | 同项目一次续跑,45 分 12 秒由预算结算。两次原生命令隐藏旧商品标注,实际落盘。四笔未知生图均保持原号。 `batch-09/desk-reconcile-r6/` | 新增 0、0、0。原 SKU 文件仍可独立读取 | 3 次。两个失效分屏编号拒掉有效查询,另一次原生写请求返回修订变化,原因仍需确证。随后两条原生命令实际写入 |
|
||||
| 顾家电脑桌 R7 原生 `f101fda3`、Agent `4ee5a5b4` | 实际按钮仅提交一次,29 分 39 秒由 Pi 收尾。详情的推理准备失败后保留草稿,主图由 Pi 留稿,SKU 导出。 `batch-09/desk-published-copy-r7/` | JPG 数 0、0、1,另有 SKU 可编辑稿 1 份,实际打开和字段核验通过 | 2 次工具错误。画布暂不可写 1 次,跨画布图位查询 1 次。另有 85 条 Pi 推理重试事件,不计为工具拒绝 |
|
||||
| 顾家电脑桌 R8 `74aba6a7` | 一次启动,16 分 03 秒因模型传输和随后 TLS 握手失败结算。实际共 84 次模型请求准备,均使用本轮验证线路。详情写入 21 格,主图写入 20 格并采用两张图。 `batch-09/desk-verified-route-r8/` | 0、0、0,已核对正式出口 | 1 次。首个图位编号少一个字符导致旧工具中断批次。另有主代理推理连接错误 4 次和 SKU 握手错误 1 次 |
|
||||
| 顾家电脑桌 R9 `23976929` | 一次启动,45 分 22 秒由既有预算结算。详情 27 个图位成功分派,主代理 503 中断后留稿。主图实际落盘 20 格文案、5 张采用图并执行两次原生命令。 `batch-09/desk-batch-delegation-r9/` | 0、0、0。主图提交后检查确认 5 个图位仍缺,SKU 尚未启动 | 1 次。组合工具提交 6 层摘要,旧参数上限 3。另有 HTTP 503 纯推理失败 1 次 |
|
||||
| 顾家电脑桌 R10 `5216332c` | 一次启动,45 分 26 秒由预算结算。主代理遇到真实 HTTP 503 后由 Pi 重试成功。详情写入 49 格后留稿,主图交接沿用已验证线路。 `batch-09/desk-native-retry-r10/` | 0、0、0。详情无采用图,主图采用 3 张,SKU 未启动 | 3 次。原生批量命令无活动图层被拒 1 次,错误被标成未知后拦住 2 次后续操作 |
|
||||
| 顾家电脑桌 R11 `b934cc90` | 只点一次,45 分 26 秒由运行预算结算。详情落盘 30 格和 1 张采用图,主图落盘 20 格和 2 张采用图,SKU 未进入。39 笔生图均已返回。`batch-09/desk-native-batch-r11/` | 0、0、0 | 8 次。4 次画布暂不可写,2 次分屏编号无效,2 次搜索无对应工具回执 |
|
||||
| 顾家电脑桌 R12,原生 `b934cc90`、Agent `04629e07` | 从同一隔离草稿的工具栏启动一次,45 分 04 秒由既有预算结算。详情 30 格、2 张图,主图 20 格、5 张图,SKU 未进入。10 笔新增生图均取得终态。`batch-09/desk-native-readiness-r12/` | 0、0、0 | 4 次。两次误把主图编号提交给仍绑详情的工具,一次用画布身份代替原生命令的标签页序号,一次历史查询的回执号无匹配。新增原生写入实际成功,未观察到同修订暂等待分支再次触发 |
|
||||
| 顾家电脑桌 R14 `6614df56` | 最新 Windows 构建实机打开原桌子草稿,直接从原回执读回 339 层,与实机引擎内容和顺序相同。`batch-09/desk-native-result-pages-r14/native-result-live-evidence.json` | 本次只读 | 控制组其它文档序号拒绝 1 次,属于项目隔离 |
|
||||
| 顾家电脑桌 R15 `f460fe62` | 真实旧请求与改写请求的归档,复制到本机隔离目录,验证主图历史候选原号追溯。`batch-09/desk-archive-r15/archive-provenance.json` | 本次仅加入待验候选 | 0 次 |
|
||||
| 顾家电脑桌 R16 `9dcbd786` | 两个正式主图位共用同一原素材任务;独立原生验收文档完成两次放置、实机保存重开和单格撤销。`batch-09/desk-shared-material-r16/shared-material-verification.json` | 本次是本地素材和画布验收,三类正式成品 0、0、0 | 0 次 |
|
||||
| R17 原请求恢复 `2174b193` | Windows 原生测试实际终止独占派发的子进程,验证重启后只核查原候选。Pi 丢回执和请求恢复通过本机夹具与回环服务验证。证据 `batch-09/desk-crash-recovery-r17/` | 本次仅核查恢复点,未发起三类成品制作 | 无模型调用;同一候选并发派发由原编号保护 |
|
||||
| R18 花色范围 `4c336dac` | 本机双花色故障注入通过。新版 Windows 客户端只读打开电脑桌可编辑验收稿。`batch-09/desk-variant-isolation-r18/` | 0、0、0。未启动新的生产轮 | 无模型调用。定向验证中,改过花色的旧候选回填被拒 1 次,属于编辑保护 |
|
||||
| R19 成品图位追溯 `33652b57` | 真实普通生图和餐椅场景合成归档各验证一份原生导出夹具。电脑桌既有正式 SKU 在隔离副本重新导出。8 份文件均在新版原生窗口重开。`batch-09/desk-chair-image-trace-r19/` | 新生产轮未执行。电脑桌已有 SKU 独立重导出 1 张,两个详情夹具单列 | 无模型调用 |
|
||||
|
||||
以上是实际导出文件数。候选、画布草稿与工具调用只作为过程证据。
|
||||
|
||||
| 顾家电脑桌 R20,Pi 源码 `8fa11fe7` | 从已锁定的正式发布物通过 Pi 原生读按需补齐 07 与 06,分别 894 毫秒、260 毫秒。隔离项目重开确认同版本与内容。`batch-09/desk-linked-skill-r20/receipt.json` | 0、0、0。只读材料验收 | 实际读取拒绝 0 次,付费模型请求 0 笔 |
|
||||
|
||||
| 顾家电脑桌 R21,源码 `17e2de76` | 隔离副本执行两笔真实旧候选的原生退役,清除独用结果与原始响应,保留另一个仍被引用的来源及两笔请求账本。`batch-09/desk-retirement-r21/retirement-proof.json` | 0、0、0。历史候选与文件验收 | 实际历史归档中的两次操作均完成。不同花色和结果未知在定向检查核验,付费模型请求 0 笔 |
|
||||
|
||||
## 本轮提交
|
||||
|
||||
- `33652b57` 成品回执记录实际回填图层、候选与原请求档案,并将分屏 JPG 关联到模板页面。
|
||||
- `4c336dac` 同项目修改花色资料时保留原请求,只更新依赖该花色的候选和交付依据。
|
||||
- `2174b193` Pi 生图操作和原生候选从本地待提交记录起共用同一个编号。原先的桌子未知请求仍保留原号。
|
||||
- `ceb1b507` 文案先落画布,再反馈具体的截断风险。
|
||||
- `e94f7f06` 公开目录用压缩响应,启动耗时按阶段记录。
|
||||
- `342d669b` 原生目录每页复用同一文档作用域,空 ID 用关键词检索。
|
||||
- `3473c08d` 三类输出在原 Pi 目标继续,实际文件通过后更新原目标。
|
||||
- `8b454f57` 按企业 Skill 链接读取分类资料,普通对话改用工具按需读取工作流。
|
||||
- `04d21340` 点文本的原稿像素只用于定位。真实段落布局和明确发布的安全框参与写后提示。移除旧逐格工具的固定批次上限,空查询按默认范围。
|
||||
- `eb10aa74` 消除 Rust 模型请求的第二套工具名单和数量限制,终态由 Pi 决定,模型报完错后不重新排入同一失败回合。
|
||||
- `6d63f1f0` 工具和 Skill 明确区分场景生成与原片裁切,回执说明请求的素材方式。
|
||||
- `bbdc4472` 批量验图逐项返回有效结论与无效图位,避免已有候选整批重验。
|
||||
- `0689de5b` Pi 可显式后台验图,并在单个图位返回前继续其他工作。
|
||||
- `34e6d8db` 文案写入保留原生暂缓回执和修订号。
|
||||
- `9e329689` 验图分开提供候选原文件像素与 JPEG 预览。
|
||||
- `0bd4dfcc` 图位操作保留各自的待核查记录,同时保留项目原操作。
|
||||
- `9ef7c305` 在制作会话说明如何沿用企业 Skill 调用现有原生图层能力。
|
||||
- `43bea986` 模板参考读取出错时,仍返回实际可用的同款实拍和参考的错误原因。
|
||||
- `d203a07a` 模板允许留空时可清空可编辑文字层,并保存留空依据。真实文件往返和原生导出夹具已核对,正式电脑桌继续验收。
|
||||
- `079cd816` 在桥接回归里验证待核查工具事件脱敏。最新原生已构建,实机 R5 已启动,证据在 `batch-09/desk-slot-isolation-r5/`。
|
||||
- `8bc63b16` 恢复 Pi 会话的工具调度默认设置。
|
||||
- `2c1e3c19` 多图位核查从持久化原候选接续。个别原操作没有进程内回执时,其它结果仍返回给 Pi。
|
||||
- `a11429ea` 图层查询保留明确分屏和筛选,空字符串按省略处理。
|
||||
- `970fae4c` 制作编辑统一走原生命令和回执。
|
||||
- `25e15c20` 工具参数区分可重试的服务失败与按验图意见返工。
|
||||
- `ccfb64b4` 主代理及子代理可通过所选线路显式优先请求 2K。
|
||||
- `1f7657eb` 按屏或字段忠实返回已发布的填写规则和样文。代码已编译,R6 验收应用本改动之前启动。
|
||||
- `887aafa6` 核查回执保留原候选的失败或未取得原因。R6 实际请求了中画质 1536 × 2048,原号结果仍无法取回,实际文件待验。
|
||||
|
||||
- 新增本机真实 `.pcraft` 往返验收,发布许可下的衬底和标线保持可编辑。27 项原生桥接回归通过。
|
||||
- `141ea999` 现有只读工具支持同次读取多屏。电脑桌 R6 的八次实机渲染共 11.524 秒,模型等待占主要耗时。259 项 Node 回归通过。
|
||||
- `fd24d8c0` 制作复核提示涵盖未映射的可见商品信息,保留模板原生元素。
|
||||
- `f101fda3` 分屏编号失效时继续明确的关键词或摘要查询。9 项原生测试通过,新构建完成。
|
||||
- `4ee5a5b4` 原生写入暂等待时回执与过期修订区分。定向和 259 项 Node 回归通过。
|
||||
|
||||
上一轮由 Pi 自己结算并保持三个草稿。详情和主图的退回候选采用白底原片。SKU 验图把 JPEG 预览尺寸和透明性当成原文件属性,已独立解码确认候选 PNG 实为 3000 × 3000,包含透明像素。场景复验已产生真实候选。像素属性回执已通过原生和 Node 回归并构建,待下一次实机。旧策划串行另有 462–492 秒损耗。当前一键工具表已交给 Pi 直接策划。另在正式电脑桌原生稿中,38 格原始样稿和双字替换都被旧映射像素边界误拒。详情见 [布局审计](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-sample-layout-audit.json>)。本机新版原生构建已完成,Node 整套回归 257 项通过。交付脚本已独立打开历史夹具的 15 张真实 JPEG,并读取可编辑稿的清单。最新实机目录校验 4.527 秒。20.069 秒画布就绪,26.816 秒开始准备首条模型请求,42.239 秒完成第一个真实工具。源码请求样本及 32 项传输回归、257 项 Node 回归均通过。场景复验已结算,实际成品仍待验证。已结束的对照窗口留有一条已派发记录,未取得网关原请求号,保留本机原操作记录。只记录一项现有资源边界,品牌或品类变化要重新装载企业资源,登记在 [limits.md](./limits.md)。
|
||||
|
||||
| 顾家电脑桌 R12,原生 `b934cc90`、Agent `04629e07` | 从同一隔离草稿的工具栏启动一次,45 分 04 秒由既有预算结算。详情 30 格、2 张图,主图 20 格、5 张图,SKU 未进入。10 笔新增生图均取得终态。`batch-09/desk-native-readiness-r12/` | 0、0、0 | 4 次。两次误把主图编号提交给仍绑详情的工具,一次用画布身份代替原生命令的标签页序号,一次历史查询的回执号无匹配。新增原生写入实际成功,未观察到同修订暂等待分支再次触发 |
|
||||
| 顾家电脑桌 R14 `6614df56` | 最新 Windows 构建实机打开原桌子草稿,直接从原回执读回 339 层,与实机引擎内容和顺序相同。`batch-09/desk-native-result-pages-r14/native-result-live-evidence.json` | 本次只读 | 控制组其它文档序号拒绝 1 次,属于项目隔离 |
|
||||
| 顾家电脑桌 R15 `f460fe62` | 真实旧请求与改写请求的归档,复制到本机隔离目录,验证主图历史候选原号追溯。`batch-09/desk-archive-r15/archive-provenance.json` | 本次仅加入待验候选 | 0 次 |
|
||||
| 顾家电脑桌 R16 `9dcbd786` | 两个正式主图位共用同一原素材任务;独立原生验收文档完成两次放置、实机保存重开和单格撤销。`batch-09/desk-shared-material-r16/shared-material-verification.json` | 本次是本地素材和画布验收,三类正式成品 0、0、0 | 0 次 |
|
||||
| R17 原请求恢复 `2174b193` | Windows 原生测试实际终止独占派发的子进程,验证重启后只核查原候选。Pi 丢回执和请求恢复通过本机夹具与回环服务验证。证据 `batch-09/desk-crash-recovery-r17/` | 本次仅核查恢复点,未发起三类成品制作 | 无模型调用;同一候选并发派发由原编号保护 |
|
||||
| R18 花色范围 `4c336dac` | 本机双花色故障注入通过。新版 Windows 客户端只读打开电脑桌可编辑验收稿。`batch-09/desk-variant-isolation-r18/` | 0、0、0。未启动新的生产轮 | 无模型调用。定向验证中,改过花色的旧候选回填被拒 1 次,属于编辑保护 |
|
||||
| R19 成品图位追溯 `33652b57` | 真实普通生图和餐椅场景合成归档各验证一份原生导出夹具。电脑桌既有正式 SKU 在隔离副本重新导出。8 份文件均在新版原生窗口重开。`batch-09/desk-chair-image-trace-r19/` | 新生产轮未执行。电脑桌已有 SKU 独立重导出 1 张,两个详情夹具单列 | 无模型调用 |
|
||||
|
||||
以上是实际导出文件数。候选、画布草稿与工具调用只作为过程证据。
|
||||
|
||||
| 顾家电脑桌 R20,Pi 源码 `8fa11fe7` | 从已锁定的正式发布物通过 Pi 原生读按需补齐 07 与 06,分别 894 毫秒、260 毫秒。隔离项目重开确认同版本与内容。`batch-09/desk-linked-skill-r20/receipt.json` | 0、0、0。只读材料验收 | 实际读取拒绝 0 次,付费模型请求 0 笔 |
|
||||
|
||||
| 顾家电脑桌 R21,源码 `17e2de76` | 隔离副本执行两笔真实旧候选的原生退役,清除独用结果与原始响应,保留另一个仍被引用的来源及两笔请求账本。`batch-09/desk-retirement-r21/retirement-proof.json` | 0、0、0。历史候选与文件验收 | 实际历史归档中的两次操作均完成。不同花色和结果未知在定向检查核验,付费模型请求 0 笔 |
|
||||
|
||||
## 本轮提交
|
||||
|
||||
- `33652b57` 成品回执记录实际回填图层、候选与原请求档案,并将分屏 JPG 关联到模板页面。
|
||||
- `4c336dac` 同项目修改花色资料时保留原请求,只更新依赖该花色的候选和交付依据。
|
||||
- `2174b193` Pi 生图操作和原生候选从本地待提交记录起共用同一个编号。原先的桌子未知请求仍保留原号。
|
||||
- `ceb1b507` 文案先落画布,再反馈具体的截断风险。
|
||||
- `e94f7f06` 公开目录用压缩响应,启动耗时按阶段记录。
|
||||
- `342d669b` 原生目录每页复用同一文档作用域,空 ID 用关键词检索。
|
||||
- `3473c08d` 三类输出在原 Pi 目标继续,实际文件通过后更新原目标。
|
||||
- `8b454f57` 按企业 Skill 链接读取分类资料,普通对话改用工具按需读取工作流。
|
||||
- `04d21340` 点文本的原稿像素只用于定位。真实段落布局和明确发布的安全框参与写后提示。移除旧逐格工具的固定批次上限,空查询按默认范围。
|
||||
- `eb10aa74` 消除 Rust 模型请求的第二套工具名单和数量限制,终态由 Pi 决定,模型报完错后不重新排入同一失败回合。
|
||||
- `6d63f1f0` 工具和 Skill 明确区分场景生成与原片裁切,回执说明请求的素材方式。
|
||||
- `bbdc4472` 批量验图逐项返回有效结论与无效图位,避免已有候选整批重验。
|
||||
- `0689de5b` Pi 可显式后台验图,并在单个图位返回前继续其他工作。
|
||||
- `34e6d8db` 文案写入保留原生暂缓回执和修订号。
|
||||
- `9e329689` 验图分开提供候选原文件像素与 JPEG 预览。
|
||||
- `0bd4dfcc` 图位操作保留各自的待核查记录,同时保留项目原操作。
|
||||
- `9ef7c305` 在制作会话说明如何沿用企业 Skill 调用现有原生图层能力。
|
||||
- `43bea986` 模板参考读取出错时,仍返回实际可用的同款实拍和参考的错误原因。
|
||||
- `d203a07a` 模板允许留空时可清空可编辑文字层,并保存留空依据。真实文件往返和原生导出夹具已核对,正式电脑桌继续验收。
|
||||
- `079cd816` 在桥接回归里验证待核查工具事件脱敏。最新原生已构建,实机 R5 已启动,证据在 `batch-09/desk-slot-isolation-r5/`。
|
||||
- `8bc63b16` 恢复 Pi 会话的工具调度默认设置。
|
||||
- `2c1e3c19` 多图位核查从持久化原候选接续。个别原操作没有进程内回执时,其它结果仍返回给 Pi。
|
||||
- `a11429ea` 图层查询保留明确分屏和筛选,空字符串按省略处理。
|
||||
- `970fae4c` 制作编辑统一走原生命令和回执。
|
||||
- `25e15c20` 工具参数区分可重试的服务失败与按验图意见返工。
|
||||
- `ccfb64b4` 主代理及子代理可通过所选线路显式优先请求 2K。
|
||||
- `1f7657eb` 按屏或字段忠实返回已发布的填写规则和样文。代码已编译,R6 验收应用本改动之前启动。
|
||||
- `887aafa6` 核查回执保留原候选的失败或未取得原因。R6 实际请求了中画质 1536 × 2048,原号结果仍无法取回,实际文件待验。
|
||||
|
||||
- 新增本机真实 `.pcraft` 往返验收,发布许可下的衬底和标线保持可编辑。27 项原生桥接回归通过。
|
||||
- `141ea999` 现有只读工具支持同次读取多屏。电脑桌 R6 的八次实机渲染共 11.524 秒,模型等待占主要耗时。259 项 Node 回归通过。
|
||||
- `fd24d8c0` 制作复核提示涵盖未映射的可见商品信息,保留模板原生元素。
|
||||
- `f101fda3` 分屏编号失效时继续明确的关键词或摘要查询。9 项原生测试通过,新构建完成。
|
||||
- `4ee5a5b4` 原生写入暂等待时回执与过期修订区分。定向和 259 项 Node 回归通过。
|
||||
|
||||
上一轮由 Pi 自己结算并保持三个草稿。详情和主图的退回候选采用白底原片。SKU 验图把 JPEG 预览尺寸和透明性当成原文件属性,已独立解码确认候选 PNG 实为 3000 × 3000,包含透明像素。场景复验已产生真实候选。像素属性回执已通过原生和 Node 回归并构建,待下一次实机。旧策划串行另有 462–492 秒损耗。当前一键工具表已交给 Pi 直接策划。另在正式电脑桌原生稿中,38 格原始样稿和双字替换都被旧映射像素边界误拒。详情见 [布局审计](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-sample-layout-audit.json>)。本机新版原生构建已完成,Node 整套回归 257 项通过。交付脚本已独立打开历史夹具的 15 张真实 JPEG,并读取可编辑稿的清单。最新实机目录校验 4.527 秒。20.069 秒画布就绪,26.816 秒开始准备首条模型请求,42.239 秒完成第一个真实工具。源码请求样本及 32 项传输回归、257 项 Node 回归均通过。场景复验已结算,实际成品仍待验证。已结束的对照窗口留有一条已派发记录,未取得网关原请求号,保留本机原操作记录。只记录一项现有资源边界,品牌或品类变化要重新装载企业资源,登记在 [limits.md](./limits.md)。
|
||||
|
||||
R11 的首条推理准备为 24.082 秒,首条有效工具回执为 32.377 秒,首次详情回填为 27 分 52 秒。253 笔模型请求进入准备,231 笔收到用量,共 11,795,682 输入和 131,823 输出 token,Pi 自动压缩 1 次、重试 20 次。运行结算后,用同一原生构建打开独立草稿副本。无活动图层时执行批量隐藏 9 层,保存并重开,9 层保持隐藏,其余图层的可见性与文档尺寸一致。见 [原生往返证据](<D:/AI Code/gongxiangp2/output/xiaoyi-harness-implementation-20261125/batch-09/desk-native-batch-r11/batch-native-open-save-reopen.json>)。
|
||||
|
||||
- `ce126fe9` 原生批量编辑按显式目标核对操作条件。
|
||||
@ -221,32 +221,32 @@ R12 续跑首条推理准备 7.674 秒,首次采用 15 分 22 秒。117 笔模
|
||||
- `769b2442` 原生目录同时提供文档身份与标签页序号。同一真实画布的显式序号和省略参数读到相同 339 层。
|
||||
- 本机原生 30 项回归、Windows 新构建和 266 项 Node 回归,见 `batch-09/native-tab-index-build-manifest.json`。
|
||||
|
||||
- `6614df56` 原生命令大结果可以按原编号、按字段分页读取。实机两页共 339 层。原生桥 31 项、Node 266 项回归和 Windows 构建通过。新增限制 0 项。
|
||||
|
||||
- `f460fe62` Pi 主代理可查阅同款历史候选并显式加入图位复核。电脑桌同图位两笔真实请求及原始 PNG 已做本机实证,新增付费请求 0。267 项 Node、46 项画布工作区回归和 Windows 构建通过。新增限制 0 项。
|
||||
- 从 R12 实际详情草稿复核,SKU 与花色的长宽高均为空,`74`、`100/120/140/160/180`、`60` 三个旧数字在未映射的可见固定层。`batch-09/desk-archive-r15/published-detail-fit-evidence.json`。已发布家具 Skill 当前要求固定标线按默认保留并人工调整,详情无人值守仍取决于规格依据或发布规则。
|
||||
|
||||
- `9dcbd786` Pi 可把本项目同款素材显式加入其它目标图位待验。独立统计素材任务与采用图位,两个采用记录经过最新版实机重开。268 项 Node、46 项原生画布和 41 项工作流桥回归通过。新增限制 0 项。
|
||||
|
||||
- `8fa11fe7` 让 Pi 读到企业 Skill 尚未下载的引用文件时,通过原路径获取版本化正文。顾家电脑桌实际读回已发布文档,4 项定向和 271 项 Pi 回归通过。无新增运行限制。K02 已明确失败清理与保留的范围,可接续 P10。
|
||||
|
||||
- `17e2de76` 小壹显式退役失败候选。完整性和项目范围沿用现有保护,当前交付退出失效素材,用户画布及旧成品文件保留。已发布 Skill 的失败清理规则和当前验收证据一并录入。新增限制 0 项。
|
||||
|
||||
- R4 回填和整屏读取共用叠层清单,制作和交付回执按当前成品修订列出复核、模板原文与空图位。小壹依据实际合成画面选择处理方式。
|
||||
|
||||
- R4 切换成品结清画布写入后即可继续,未派发图位返回待制作,已发请求由宿主继续核查。纯文字续跑回合结束后暂停本轮,用户可在原会话继续。
|
||||
|
||||
## 待负责人决定
|
||||
|
||||
| 事项 | 选项与影响 |
|
||||
| --- | --- |
|
||||
| 预算 | 保持现有 45 分钟、既有图片次数和并发行为;若实机证实它阻断完整生产,改为启动时可见并可配置的项目预算,保留已完成资料与请求编号 |
|
||||
| 自动采用与双候选 | 由发布的项目政策明确何时两候选、如何处理两张均失败或仅一张合格。P07 继续独立标记 |
|
||||
| 托盘与退出 | 可继续保留显式退出后恢复,也可单独定义关窗留托盘。后者延长后台进程存活,需明确 UI 语义 |
|
||||
| 项目存储 | 继续现有工程和独立资产,或按设计迁移 SQLite。先完成原编号和可编辑文件一致性的证据 |
|
||||
| 本机 Bash | 当前由 Pi SDK 调项目目录内的 Docker 环境。替换隔离方式会改变 Windows 本机前置条件 |
|
||||
| 模板缺少发布许可 | 旧架构 A03 写着无许可即拦。按后来产品要求,未发布许可时原生命令默认允许并记录。发布了具体范围时按模板声明执行 |
|
||||
| 商品标注的 Skill 规则 | 现有家具 Skill 将指示线配套的文字、尺寸和材质列为人工后期。R6 的 Pi 自行隐藏两组旧标注,副本上仍有独立的旧材质与质保说明。可在正式企业资源明确无人值守对旧字样的更新、留空或隐藏规则,现有发布资源继续使用原版本 |
|
||||
| 电脑桌本款尺寸 | R20 按 SZ012616 查正式知识库未找到对应文件。当前字段范围和已发布的退役记录均未覆盖草稿里仍显示的三处固定旧规格。补本款正式规格表,或在模板发布物明确这些旧数字与标线在缺值时允许隐藏,再续做详情并验收三类输出。见 `batch-09/desk-linked-skill-r20/desk-spec-and-fixed-layers.json` |
|
||||
|
||||
- R4 · 开画布前的制作计划列出可读的固定版本规则文件。画布计划返回图位关联文案就绪状态,派发回执列出宿主标记待写的关联文字并按请求排队。小壹根据实时文案和验图依据自主安排制作批次。
|
||||
- `6614df56` 原生命令大结果可以按原编号、按字段分页读取。实机两页共 339 层。原生桥 31 项、Node 266 项回归和 Windows 构建通过。新增限制 0 项。
|
||||
|
||||
- `f460fe62` Pi 主代理可查阅同款历史候选并显式加入图位复核。电脑桌同图位两笔真实请求及原始 PNG 已做本机实证,新增付费请求 0。267 项 Node、46 项画布工作区回归和 Windows 构建通过。新增限制 0 项。
|
||||
- 从 R12 实际详情草稿复核,SKU 与花色的长宽高均为空,`74`、`100/120/140/160/180`、`60` 三个旧数字在未映射的可见固定层。`batch-09/desk-archive-r15/published-detail-fit-evidence.json`。已发布家具 Skill 当前要求固定标线按默认保留并人工调整,详情无人值守仍取决于规格依据或发布规则。
|
||||
|
||||
- `9dcbd786` Pi 可把本项目同款素材显式加入其它目标图位待验。独立统计素材任务与采用图位,两个采用记录经过最新版实机重开。268 项 Node、46 项原生画布和 41 项工作流桥回归通过。新增限制 0 项。
|
||||
|
||||
- `8fa11fe7` 让 Pi 读到企业 Skill 尚未下载的引用文件时,通过原路径获取版本化正文。顾家电脑桌实际读回已发布文档,4 项定向和 271 项 Pi 回归通过。无新增运行限制。K02 已明确失败清理与保留的范围,可接续 P10。
|
||||
|
||||
- `17e2de76` 小壹显式退役失败候选。完整性和项目范围沿用现有保护,当前交付退出失效素材,用户画布及旧成品文件保留。已发布 Skill 的失败清理规则和当前验收证据一并录入。新增限制 0 项。
|
||||
|
||||
- R4 回填和整屏读取共用叠层清单,制作和交付回执按当前成品修订列出复核、模板原文与空图位。小壹依据实际合成画面选择处理方式。
|
||||
- R4 切换成品结清画布写入后即可继续,未派发图位返回待制作,已发请求由宿主继续核查。纯文字续跑回合结束后暂停本轮,用户可在原会话继续。
|
||||
|
||||
## 待负责人决定
|
||||
|
||||
| 事项 | 选项与影响 |
|
||||
| --- | --- |
|
||||
| 预算 | 保持现有 45 分钟、既有图片次数和并发行为;若实机证实它阻断完整生产,改为启动时可见并可配置的项目预算,保留已完成资料与请求编号 |
|
||||
| 自动采用与双候选 | 由发布的项目政策明确何时两候选、如何处理两张均失败或仅一张合格。P07 继续独立标记 |
|
||||
| 托盘与退出 | 可继续保留显式退出后恢复,也可单独定义关窗留托盘。后者延长后台进程存活,需明确 UI 语义 |
|
||||
| 项目存储 | 继续现有工程和独立资产,或按设计迁移 SQLite。先完成原编号和可编辑文件一致性的证据 |
|
||||
| 本机 Bash | 当前由 Pi SDK 调项目目录内的 Docker 环境。替换隔离方式会改变 Windows 本机前置条件 |
|
||||
| 模板缺少发布许可 | 旧架构 A03 写着无许可即拦。按后来产品要求,未发布许可时原生命令默认允许并记录。发布了具体范围时按模板声明执行 |
|
||||
| 商品标注的 Skill 规则 | 现有家具 Skill 将指示线配套的文字、尺寸和材质列为人工后期。R6 的 Pi 自行隐藏两组旧标注,副本上仍有独立的旧材质与质保说明。可在正式企业资源明确无人值守对旧字样的更新、留空或隐藏规则,现有发布资源继续使用原版本 |
|
||||
| 电脑桌本款尺寸 | R20 按 SZ012616 查正式知识库未找到对应文件。当前字段范围和已发布的退役记录均未覆盖草稿里仍显示的三处固定旧规格。补本款正式规格表,或在模板发布物明确这些旧数字与标线在缺值时允许隐藏,再续做详情并验收三类输出。见 `batch-09/desk-linked-skill-r20/desk-spec-and-fixed-layers.json` |
|
||||
|
||||
- R4 · 开画布前的制作计划列出可读的固定版本规则文件。画布计划返回图位关联文案就绪状态,派发回执列出宿主标记待写的关联文字并按请求排队。小壹根据实时文案和验图依据自主安排制作批次。
|
||||
- R4 · 成品按输出和款式跟踪手改,映射回填沿用模板原锁并保护制作期间新增的锁,切换制作成品时重置图位进度。
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user