4 Silent Failures Behind a Portfolio Dashboard & How to Fix Them | Mycroft

Using the Mycroft finance pipelines, the video follows four mornings where a handoff between workflows slips without any visible sign. Each one is fixed with a check, and a flawed test shows why a check that cannot fail is worse than none.

3:07 video3 min readWatch on YouTube

A portfolio dashboard can look finished: five stocks, one total, a percentage gain, all neatly drawn. This video by Tanmay Kulkarni, speaking for Humanitarians AI, points out that every number on that screen arrived through quiet handoffs, places where one part of the system takes another part's word for it. It spends four imagined mornings with the dashboard, letting one handoff slip each time.

The setting: two recipes behind one screen

The work comes from Mycroft, described as both a book and a working repository for finance pipelines. It calls its workflows recipes. Two of them sit behind the dashboard: one fetches prices and does the math, and the other calls it and draws the screen. The speaker's merged pull request added checks to both and rebuilt the math step so that it runs on test data. Every price shown in the video is invented for testing.

Morning one: a zero price that looks normal

One stock comes back with a price of zero. The workflow reads the price with a JavaScript "or," and in JavaScript a zero counts as missing, so the workflow quietly uses the previous close instead. The dashboard looks perfectly normal and the math is right, but the reader does not know which price they are seeing. The speaker kept that behavior because it is the workflow's own choice, and the recipe now notes it for maintainers. What changed is the record: for every stock, the output now says which price was used.

Morning two: a symbol the portfolio does not hold

A response arrives for a symbol the portfolio does not contain. In the original, the calculation looked up how many shares were owned, found nothing and stopped with an error. Now a check before it catches the response first and sets it aside with a reason, and the calculation refuses to run on anything that check turned away. Nothing half-finished reaches the screen.

Morning three: the portfolio written out twice

The portfolio, meaning which stocks, how many shares and what was paid, is written out twice inside the same workflow. One copy decides which prices to fetch and the other does the math. Edit the shares in the first and the math keeps using the second, so the total does not move and nothing says why. The first step now reads both copies and stops if they disagree, naming the difference.

Morning four: a placeholder name

The dashboard holds no prices itself. It calls the price workflow and finds it by name, because the ID that would pin it down is still a placeholder. The dashboard's first step now checks that the name it calls is the price workflow's real name, and stops if it is not.

The test that could not fail

The video also admits a mistake in its own checking. To confirm the checks could fail, the speaker broke the calculation on purpose and ran the test meant to catch it. The test passed, because the broken version had never run and the test was grading a file left over from the good run. A check that cannot fail is worse than no check, because it looks like one. The test now refuses to grade anything unless the broken version really ran.

Key takeaways

  • A finished-looking dashboard can hide handoffs that take another step's word on trust.
  • In JavaScript, an "or" fallback treats a zero price as missing, so record which value was actually used.
  • Set aside unexpected payloads with a reason, and make calculations refuse anything a check turned away.
  • When the same data is written twice in one workflow, compare the copies and stop if they disagree.
  • Verify that a workflow you call by name is the real one, especially while its ID is a placeholder.
  • Prove that a test can fail by confirming the broken version actually ran.
  • Both recipes are still drafts, and some steps still run on trust.

Try it yourself

Pick one number you look at every morning and ask what it is quietly taking on trust, and what would tell you if that trust slipped. The video suggests a good answer names both the handoff and the thing that would say so.

Chapters

  1. 0:00Introduction: The Illusion of a Finished Portfolio Dashboard - Morning 1: Zero-Price Fallbacks & JavaScript "OR" Truthiness - Morning 2: Handling Unheld Stocks & Rejecting Incomplete Payloads
  2. 2:20Morning 3: Detecting Duplicate Stock Lists in the Same Workflow
  3. 3:00Morning 4: Placeholder Workflow Names & Calling Real IDs 03:45 - Catching the Flawed Test: When Broken Code Passes Leftover Cache
Full transcript(auto-generated, with timestamps)

Introduction: The Illusion of a Finished Portfolio Dashboard - Morning 1: Zero-Price Fallbacks & JavaScript "OR" Truthiness - Morning 2: Handling Unheld Stocks & Rejecting Incomplete Payloads

[0:00]Here's a portfolio dashboard the way its reader sees it over morning coffee. Five stocks, one total $65,98 up 21%. It looks finished, but every number on this screen arrived through a few quiet handoffs, places where one part of the system takes another part's word for it. So, let's spend four mornings with this dashboard and on each one let one of those handoffs slip. Hi, this is Tanme Kolc Carney in for humanitarians AI. This week, I contributed to Microoft, which is both a book and a working repository for finance pipelines. It calls them recipes. Two of them sit behind this dashboard. One fetches the prices and does the math. The other calls it and draws the screen. My pull request now merged added checks to both and rebuilt the math step so it runs on test data. Every price you'll see is invented for testing. Morning one. Vote for one stock comes back with a price of zero. The

Workflow reads the price with a JavaScript or and a JavaScript zero counts as missing. So it quietly uses the previous close 590 and the dashboard looks perfectly normal. The math is right. The reader just doesn't know which price they're looking at. I kept that behavior exactly because it's the workflow's choice, not mine. And the recipe now notes it for the maintainers. What changed is the record. For every stock, it now says which price was used. Morning two. A response comes back for a symbol the portfolio doesn't hold. In the original, the calculation looks up how many shares you own, finds nothing, and stops with an error. Now, the check before it catches the response first and sets it aside with a reason. And the calculation refuses to run on anything that check turned away. Nothing half-finish reaches the screen. Warning three. And this one surprised me. The portfolio which stocks how many shares what you paid is written

Out twice inside the same workflow. One copy decides which prices to fetch. The other one does the math. Edit the shares in the first and the math keeps using the second. The total doesn't move and nothing says why. So the first step now reads both copies and stops if they disagree naming the difference. Mo four. The dashboard doesn't hold any prices itself. It calls the price workflow and it finds it by name. The ID that would pin it down is still a placeholder. So, the dashboard's first step now checks that the name it calls is the price workflow's real name and stops if it isn't. And then there was the morning it was my own check. To make sure these checks could actually fail, I broke my own calculation on purpose and ran the test that's meant to catch it. It passed all green, but the broken version had never run at all. My test was grading a

Morning 3: Detecting Duplicate Stock Lists in the Same Workflow

[2:20]File left over from the good run. A check that can't fail is worse than no check because it looks like one. Now the test won't grade anything unless the broken version really ran and then it catches the break down to a single scent. So here's the same dashboard on any morning. Nothing on the screen changed. What changed is behind it. Four handoffs that now speak up when they slip and some that still run on trust. Fetching live prices. Three more steps in one recipe and five in the other. Both recipes are still drafts and they say so. Pick one number you look at every morning. What is it quietly taking on trust? And if that trust slipped, what would tell you? A good answer names the handoff and the thing that would say so. It's always been right. Doesn't

Morning 4: Placeholder Workflow Names & Calling Real IDs 03:45 - Catching the Flawed Test: When Broken Code Passes Leftover Cache

[3:00]Count. Four mornings. Tanme Kulcarnney in for humanitarians AI signing off.

More from Mycroft Financial AI

Humanitarians AI Lyrical Literacy Project