Filament

A daily repair job for the filament tracker

I added a daily Codex job to check the filament tracker. When it finds a problem it can diagnose clearly, it can fix the code, validate the change, deploy it, and check the live site again.

I set the requirements and gave it permission to make scoped repairs. Codex does the investigation, implementation, and deployment. Codex also drafted this post from the recorded runs and my direction.

The stock scraper already runs hourly. This is a separate maintenance check: are the pages fresh, are products missing, do the history charts still connect to the current inventory, and do the bulk-sale markers agree with Bambu’s promotion data? It checks all eight regional pages and opens charts in a browser too.

Two runs show why I wanted this.

Whitespace broke 41 charts

On September 18, the daily check found 41 Japanese variants whose current rows no longer matched their history keys. The storefront’s product categories had trailing or duplicate whitespace. The inventory was there, but the chart lookup was broken.

Codex changed the report generator to normalize Unicode and whitespace in the history keys and put the resolved key on each row. It committed and pushed the fix, deployed through the project’s deployment script, and ran the production job.

The live check found no current variants missing history. It also opened a repaired Japanese PLA Silk+ chart and a Global Ash Gray chart, and checked that the regional pages were fresh and below the 2 MB size limit.

Blue became Reflex Blue

On October 12, the check found another split in Japan’s history. PETG Basic Blue had become Reflex Blue, but it still had color code 30603 and the same packaging. Matching by the displayed name made one product look like two separate histories.

Codex added a narrow alias for that rename, committed and pushed it, validated it locally, and deployed it. The stored history records were preserved. Afterward, the spool and refill charts each had one continuous 723-point series spanning September 12 through October 12. Codex checked the live Japan and Global charts as well.

These are small fixes, but they are the sort of maintenance I would otherwise have to notice and sit down to investigate. The daily job gives Codex a reason to look before I happen to open the affected chart.

The checks still have limits. Bambu’s regional promotion pages sometimes redirect to the US page, so Codex reports that it cannot independently verify each region’s bulk-sale rules. If it cannot establish a clear fix, the job is instructed to report the problem for me to follow up.

12:00 am / Bambu , Filament , Automation , Codex , Ai assisted

Bambu Lab Store Filament Tracker

I’ve been running a Bambu Lab Store filament tracker at bbltracker.com.

I built this tracker with the assistance of Google Antigravity and Codex. I supplied the ideas and directed the work; the agents did essentially all of the technical investigation and coding. AI also drafted this post.

bbltracker dashboard

I recently got into 3D printing. A lot of what I print is practical: last-millimeter adapters, things like robot vacuum ramps around the house, and other tiny fixes that make daily life less annoying.

Bambu Lab released the P2S, their flagship midrange printer, and I picked one up after hearing how polished their ecosystem is. People call them the Apple of 3D printers, and I can see why. The hardware is solid, but the software and ecosystem are really what make it shine.

There is also a bit of a format war around filament. Bambu sells filament with RFID tags that are not easy for third parties to mimic. The RFID flow makes loading filament easy and automatically applies Bambu-tuned profiles. Some people feel those profiles run too fast, but for my functional prints, they have worked great.

Where the frustration started

I like having color options, and color can be functional too. But stock has been rough for a while, even after the holiday season.

That rough stock situation (and the need for a tracker) is really a symptom of how popular Bambu has gotten, especially over the holidays:

Handy chart showing Bambu popularity spike over the holidays

Source: Reddit comment

Then there is the constant bulk-sale mechanic on the Bambu Lab Store: buy 4+, get a strong discount, buy more, save more. In practice, that falls apart when the combinations you want are never all in stock at the same time.

At the time, the store UI also made this harder than it needed to be. Out-of-stock options were not clearly crossed out, so building a cart felt like guesswork.

That made me angry, but in a constructive way. So I built a tracker.

What the tracker does

At a high level, the tracker monitors store inventory over time, keeps historical snapshots, and renders a dashboard so I can quickly answer:

  • What is actually in stock right now?
  • What appears stable versus constantly draining?
  • What was the last major restock spike?
  • Are there ETA hints for restocks?
  • Is this likely to go out of stock soon?

I started with only the US store, then expanded to EU, CA, UK, AU, and Asia coverage.

I also reused a stock-quantity verification trick I had learned while documenting openpilot’s Toyota security key journey.

Building it fast (and keeping it moving)

I started with Google Antigravity, then moved to Codex later. During the transition, I used a mix of both. Web scraping is tedious work, and having the agents write and revise the code made the constant tweaks easier to keep up with.

The codebase is not pretty in every corner, but LLMs have made it very workable to maintain and improve continuously.

Later, I added depletion-rate estimation so the tracker can make a rough guess about when something might go out of stock.

Things that happened after launch

After I released it and posted it on /r/BambuLab, a bunch of interesting things happened:

  • Bambu nerfed the original stock-count hole the tracker used.
  • For a while, counts were capped at 200 in the US view, which reduced visibility.
  • Later, that cap moved to 400 in the US store. Maybe my tracker’s utility was actually a factor in that decision? I do see traffic from China, where there is no Bambu Lab Store of the same codebase as far as I can see.
  • Bambu improved their UI and added clearer out-of-stock cross-outs.
  • I added more quality-of-life indicators, including “stable stock,” ETA context, and restock-spike visibility.
  • I added a GoFundMe and a nice patron funded a custom domain and hosting for the tracker.

Backend at a glance

Keeping this online reliably has mostly been a deployment and operations problem:

If you print a lot and buy filament in batches, this has been much better than manually refreshing product pages and hoping for the best.

8:10 pm / Bambu , Filament , Duckdb , Typescript , Cloud run , Cloudflare pages , Ai assisted , Google antigravity , Codex