Engineering notes

Engineering note · Repair handoff

Delivery Evidence Package: How to Review a Small Script Repair

Illustrative repair check: repeat one event twice, reproduce two alerts before the fix and require one afterward. Actual logs still need to be measured.
Hypothetical case. Expected counts are not measured results.

Every example below is a hypothetical illustration with sample values. No runs were performed for this guide, so observed outcomes stay pending.

A "done" message does not establish what was tested. A delivery evidence package is one folder that answers three questions: what exactly changed, what stayed untouched, and what ran. This review uses one concrete defect as the worked case.

A worked defect: the duplicate alert

Suppose the frozen scope names one defect in AlertHandler: the same event, delivered twice, produces two alerts instead of one. The folder should state expected outcomes per exact test condition.

  1. Duplicate event. Fixture events_dup_01.txt holds two copies of event ID EVT-4751. Expected count: two alerts on the old source, one alert on the repaired source. Observed: PENDING.
  2. Invalid event. Fixture events_invalid_01.txt holds ID EVT-0000 with a missing payload. Expected: rejected, zero alerts, no stored change. Observed: PENDING.
  3. Restart replay. Run events_dup_01.txt, restart, then feed the same stream again. Expected: the already handled ID is not replayed. Observed: PENDING.

Only paired expected and actual logs can close these conditions.

What the folder must contain

  • scope-frozen.md: target file, single defect, allowed files, out of scope items, acceptance conditions.
  • src_before/ and src_after/: complete files, not snippets.
  • hashes.txt: one complete-file hash per file.
  • build-version.txt: compiler or build version, platform version, date.
  • fixtures/: named inputs like the three above, each with a stated purpose.
  • logs/: full expected and actual logs for every condition.
  • control/: one item that should not change.

Sample manifest

FilePurposeSample value
scope-frozen.mdfrozen scopeSAMPLE: defect "duplicate alert on repeated event ID"
src_before/AlertHandleroriginalSAMPLE: complete file, hash to fill
src_after/AlertHandlerrepairedSAMPLE: complete file, hash to fill
hashes.txtintegrity onlySAMPLE: hash values to fill
build-version.txtrepeatable buildSAMPLE: version and date to fill
fixtures/events_dup_01.txtduplicate caseSAMPLE: two copies of EVT-4751
logs/run1_actual.txtobserved behaviorSAMPLE: PENDING
control/report_rules.txtuntouched controlSAMPLE: hash to fill, no change

Compare a complete-file hash against a trusted earlier record to check whether the bytes match. The hash does not establish who produced the file or whether its behavior is correct. A wrong file also has a valid hash. Paired logs support only the behavior and conditions actually tested.

The paired defect check

Ask for the same check on the old source and the new source, with the same fixture and steps. The old source should show the defect present. The new source should show it absent. In the worked case, that means two alerts on src_before and one on src_after, each backed by a full log. One run on one version says nothing about the other.

Three result types

  1. Positive: the intended change works under the exact condition it targets.
  2. Negative: invalid input is rejected without touching stored state.
  3. Failure path: an unconfirmed result is treated as unresolved, and stored state is inspected before any retry.

A package with only positive results has not been reviewed for failure.

Fixes are not additions

A fix restores the frozen scope. An addition changes behavior outside it, like a new setting or alert channel. Additions need their own scope and tests. Compare the complete source changes with the frozen scope. Logs may miss extra behavior on paths the tests never exercised. Ask about any unexplained addition.

Why compile and screenshots fall short

A clean compile proves the code parsed and built. It says nothing about which item received the change, whether the control stayed unchanged, or what happens at runtime with a duplicate event. A screenshot is one moment on screen. Neither shows alert counts under a fixture or replayed IDs after restart. For behavior, you need expected and actual logs.

One dated example

On 23 August 2026, public issue 475 reported Pine tools writing over the currently open saved script while returning success (https://github.com/tradesdontlie/tradingview-mcp/issues/475). That is a dated report, not a current-version claim. Save-specific safeguards are covered separately at https://stratcorealpha.com/engineering-notes/pine-save-binding.

Free handoff review checklist

  • Frozen scope names target, defect, allowed files, acceptance.
  • Complete before and after files for the target.
  • Complete-file hashes recorded, treated as identity only.
  • Compiler or build version with date.
  • Named fixtures with purposes and exact conditions.
  • Full expected and actual logs for each condition.
  • One unchanged control with before and after evidence.
  • One defect shown present, then absent, same fixture and steps.
  • Positive, negative and failure path results present.
  • Fixes listed separately from additions.
  • Missing items recorded in a gap table.

Sample gap table

Missing evidenceRisk it leaves openSample entry
Actual log for the duplicate casefix unconfirmedSAMPLE: PENDING
Control after statewider effect unknownSAMPLE: request evidence
Build versionrun not repeatableSAMPLE: version to fill
Restart replay resultreplay risk unmeasuredSAMPLE: PENDING
Hash for the after fileidentity unconfirmedSAMPLE: hash to fill

Trading risk disclosure

Futures and forex trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing one's financial security or lifestyle. Only risk capital should be used for trading, and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.

Hypothetical performance disclosure

Hypothetical performance results have many inherent limitations. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. There are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. Hypothetical results are generally prepared with the benefit of hindsight, do not involve financial risk, and cannot completely account for the impact of financial risk in actual trading. Market conditions, the ability to withstand losses, and adherence to a trading program can all materially affect actual results.

NinjaTrader trademark disclosure

NinjaTrader® is a registered trademark of NinjaTrader Group, LLC. No NinjaTrader company has any affiliation with the owner, developer, or provider of the products or services described herein, or any interest, ownership or otherwise, in any such product or service, or endorses, recommends or approves any such product or service.

Testimonials, when shown, may not represent the experience of other clients and are not a guarantee of future performance or success. Virtual-currency trading carries additional risks. See the CFTC customer advisories. Read the full financial risk disclaimer.