SShortSingh.
Back to feed

Developer finds AI liking posts riskier than posting, builds strict two-stage approval

0
·5 views

A developer who had already automated their product's social media posting decided to extend the AI agent's capabilities to liking, replying, and following other users' content. During the design phase, they realized that actions directed at other people carry a fundamentally different risk profile than publishing one's own content, since even a like instantly notifies the recipient and creates a public record. To manage this, they built a two-stage approval system where the second stage authorizes only a single, precisely identified action defined by target, action type, and message body. They also added mandatory identity verification for both their own account and the target account, an idempotency guarantee to prevent duplicate actions, and a read-only constraint on locating interactive buttons to stop exploratory navigation from accidentally triggering irreversible actions. The developer concluded that the most useful design principle was not whether an action can be undone, but whether it reaches out and affects another person.

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 ·

What a Fractional CTO Does and Why Startups Are Hiring Them Part-Time

A Fractional CTO is a senior technology executive who works with companies on a part-time or contract basis, offering strategic guidance, architecture oversight, and engineering mentorship. The arrangement gives early-stage startups and non-technical founders access to C-suite technical expertise without the cost of a full-time executive hire. Rates typically start at $200 per hour, making the role a cost-effective alternative to a permanent CTO salary, benefits, and equity package. In one case study, a Fractional CTO helped a company cut its monthly AWS bill from $17,000 to $2,000 by migrating to a privately hosted cloud infrastructure, saving an estimated $471,000 in operational expenses over three years. The author, a technology professional who has been performing this role for four years, argues that companies could benefit from engaging multiple Fractional CTOs to diversify technical leadership rather than relying on a single executive.

0
ProgrammingDEV Community ·

Why AI Image Batches Lose Visual Consistency and How to Fix It

When generating product images in bulk using AI tools, visual drift — inconsistent colours, margins, and subject sizes — tends to emerge around the 80th image in a batch. Three root causes drive this: prompt ambiguity, random model seeds, and misaligned reference inputs, two of which cannot be solved by rewriting prompts alone. A structured workflow involving three anchor reference images, numerical constraints, and a brand kit configuration can significantly reduce drift before scaling up. Running a pilot batch of ten images side by side — rather than paging through them individually — is recommended to catch inconsistencies early and cheaply. Scaling in smaller concurrent batches, rather than one large queue, also limits costly rework when something goes wrong.

0
ProgrammingDEV Community ·

Per-User SQLite Files Proposed as Simpler Alternative to Horizontal Scaling

A system design article on DEV Community challenges the conventional wisdom of horizontal scaling, arguing that adding load balancers, Redis caches, and shared database servers introduces new fragility rather than true resilience. The author points out that distributing traffic across multiple API instances breaks session state, while a Redis dependency can become a single point of failure that takes down the entire application. Complex distributed transaction patterns like Two-Phase Commit or the Saga Pattern are often required once business logic spans multiple servers. As an alternative, the article proposes assigning each user a dedicated SQLite file, which eliminates cross-user data leaks by physical file boundaries and removes network latency by embedding the database engine within the application process. Public or aggregated data is handled via a separate lightweight metadata database that can be rebuilt from individual user files if corrupted.

0
ProgrammingDEV Community ·

AI Firm Scores 99.95% on Memory Benchmark by Training Models on Test Data

A company achieved a near-perfect 99.95% score on LoCoMo, the leading benchmark for long-term conversational AI memory, by post-training memory directly into model weights using the same conversation set the benchmark evaluates. The team openly acknowledges the result does not prove their model is superior, but rather demonstrates the ceiling of parametric memory when a model is explicitly taught a corpus of conversations. Unlike the widely used retrieval-augmented generation (RAG) approach, baking memory into model weights eliminates recurring token costs, prevents cross-tenant data leakage, and enables fully offline deployment. However, the method carries real trade-offs, including slower updates, difficulty deleting specific facts under privacy regulations, and weaker generalization to unseen conversations. To address the benchmark's inability to separate recall from generalization, the team is proposing an extension called LoCoMo-Δ that withholds conversations from training to test true out-of-sample performance.