Fixed drivers and recursive layers [ftip-00EI]
✍️sourceAGENTDRAFTED
Fixed drivers and recursive layers [ftip-00EI]
✍️sourceAGENTDRAFTED
A fixed meta-operation generates mutable layer artifacts. Their composition determines the resulting recursive wrapper.
Definition 1. Recursive layer state [ftip-00EJ]AGENTDRAFTED
Definition 1. Recursive layer state [ftip-00EJ]AGENTDRAFTED
Let \(S_1\) be a base solver and, for \(d\geq 2\), let \(C_d\) be a layer artifact and \(M_d\) a wrapper. The depth-\(d\) solver is \(S_d=M_d(C_d,S_{d-1})\). The layer state is \(\Lambda _d=(C_d,S_d)\).
A layer is a harness transformation when it changes \(C_d\) or the wrapper context while leaving the executable base weights in \(S_1\) fixed.
Definition 2. Fixed meta-operation [ftip-00EK]AGENTDRAFTED
Definition 2. Fixed meta-operation [ftip-00EK]AGENTDRAFTED
A fixed meta-operation is a single map \(\Omega \) whose code and prompt template are held fixed across depths. For task set \(\mathcal T\), traces \(\boldsymbol \tau _{d-1}\), code stack \([C_2,\ldots ,C_{d-1}]\), and depth \(d\),
\[\Omega (\boldsymbol \tau _{d-1},[C_2,\ldots ,C_{d-1}],\mathcal T,d)=C_d.\]Only the input to \(\Omega \) changes with depth; this is a declared protocol condition, not a claim that every implementation obeys it.
Definition 3. Trace-and-code input [ftip-00EL]AGENTDRAFTED
Definition 3. Trace-and-code input [ftip-00EL]AGENTDRAFTED
For each task \(t_i\), a trace \(\tau _i^{(d)}\) is a finite record containing the produced artifact, execution outcome, score, and declared evaluator feedback. The depth-\(d\) input to \(\Omega \) is the pair \((\boldsymbol \tau _{d-1},[C_2,\ldots ,C_{d-1}])\); a flat refiner that sees only \(\boldsymbol \tau \) has a strictly smaller declared input when the code stack is not recoverable from the traces.
Theorem 4. Nested wrapper composition [ftip-00EM]AGENTDRAFTED
Theorem 4. Nested wrapper composition [ftip-00EM]AGENTDRAFTED
If every wrapper leaves its inner solver and earlier libraries unchanged, then induction on \(d\) gives
\[S_d=M_d\circ M_{d-1}\circ \cdots \circ M_2\circ S_1.\]Proof. The case \(d=2\) is the definition. Substituting the induction hypothesis into \(S_d=M_d(C_d,S_{d-1})\) gives the displayed composition.
Theorem 5. Finite trace growth under recursive wrapping [ftip-00EN]AGENTDRAFTED
Theorem 5. Finite trace growth under recursive wrapping [ftip-00EN]AGENTDRAFTED
Suppose each wrapper emits one finite trace record per task and there are \(N\) tasks and depths \(2,\ldots ,d\). The audit log contains at most \(N(d-1)\) depth-tagged records, in addition to the base records. This is a counting fact; it says nothing about trace quality or score improvement.
Proof. There are \(d-1\) wrapped depths and \(N\) records at each depth, so the product counts all records.
Example 6. Code explains a regression that traces alone cannot [ftip-00EO]AGENTDRAFTED
Example 6. Code explains a regression that traces alone cannot [ftip-00EO]AGENTDRAFTED
Two runs can share the same failing score and stderr trace while one layer adds an over-prescriptive directive and another adds a helper. Recording the code artifact alongside the trace permits a later layer to roll back the directive without discarding the helper. This is an audit example, not a guarantee that a recursive driver finds the rollback.