SShortSingh.
Back to feed

How One Developer Built a 237-Endpoint Vedic Astrology API and the Bugs Found Along the Way

0
·2 views

A developer recently published a technical retrospective on building GrahaAPI, a REST API covering 237 endpoints across 23 modules of Vedic astrology with bilingual Hindi and English responses. The project surfaced a subtle thread-safety bug in the underlying C ephemeris library, where FastAPI's threadpool silently defaulted new threads to tropical zodiac mode instead of sidereal, returning plausible but astronomically wrong planetary positions with no errors. To validate accuracy, the team built regression tests anchored to centuries-old classical invariants — such as Vimshottari dasha periods summing to exactly 120 years and fixed choghadiya sequences — treating any test failure as a code defect, never a test flaw. One such test caught a time-formatting bug where 59.57 seconds was rounded to 60 without carrying over into the next minute, displaying 07:59:34 as 07:00. The post highlights how legacy domain knowledge with frozen specifications can serve as unusually reliable test fixtures for modern software systems.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Verdict Tool Forces Verified Bug Reproduction Before Any Patch Is Accepted

Verdict is an open-source agent harness designed to enforce evidence-based bug investigation before any fix is written or merged. The tool uses three sequential subagents — Hunter, Surgeon, and Insurance — to identify trigger conditions, localize the responsible code change, and generate a regression test. No patch is considered valid unless it passes a test case that was built from verified, reproducible failure evidence. All observations are logged in an evidence ledger and cannot be discarded, even if they weaken a proposed explanation. Verdict runs as a GitHub Action or standalone CLI, with maintainers controlling which commands and environments the agents are permitted to use.

0
ProgrammingDEV Community ·

Persona-Execution Separation: A Two-Domain Architecture for Governed AI Agents

Organizations deploying AI agents face a structural tension between allowing agents to adapt over time and maintaining immutable, auditable records required by compliance teams. Persona-Execution Separation (PES) is a proposed architectural pattern that addresses this by splitting an agent into two distinct trust domains: a low-trust persona side handling tone and instructions, and a high-trust execution side managing stateful actions, data access, and audit logs. A governed contract bridge connects the two domains, enforcing approval matrices, data loss prevention grading, and stable identity continuity across the boundary. The pattern ensures that changes to an agent's persona do not invalidate past execution logs or trigger re-certification of audit trails. PES is driven by the principle that LLM internal states cannot reliably distinguish cosmetic changes from substantive ones, making an external validation gate necessary.

0
ProgrammingDEV Community ·

Writer Catches Himself Twice: How Visible Lists and Identical Prompts Skewed AI Randomness Tests

A developer published a self-experiment attempting to measure randomness in digit selection, only to issue a correction within 36 hours after spotting critical methodological flaws. The original test had the author writing 100 digits while viewing the previous ones, meaning apparent fairness likely reflected list-tracking rather than genuine randomness. A follow-up control — asking for single digits without any visible list — produced extreme bias, with responses converging almost entirely on the number 7. A further error was caught when all test prompts turned out to be byte-identical, potentially reducing 100 trials to one repeated result; adding unique request IDs still returned 7 in 50 out of 50 trials. The author concluded that observed patterns were artifacts of context and input structure, not meaningful signatures of how choices are made.

0
ProgrammingDEV Community ·

Why Cold Email AI Fails Without Vector Databases for Fact Retrieval

AI-powered cold email tools often produce confident but inaccurate personalizations because large language models generate plausible-sounding text rather than verified facts. A more reliable approach splits the task into two stages: a retrieval layer that assembles confirmed, timestamped signals about a prospect, and a generation layer where the LLM writes copy based only on those verified facts. Signals such as recent job changes, funding events, tech stack shifts, and public posts are embedded as vectors and retrieved based on both relevance and recency. Stale data is a major failure point, so retrieval systems should apply a recency weight alongside similarity scores to avoid referencing outdated information. Additional pitfalls include entity resolution errors, such as conflating two people with the same name or attributing an acquirer's news to a smaller company, which are data-matching problems rather than model limitations.