SShortSingh.
Back to feed

Why Every AI-Assisted Code Change Needs a Separate Provenance Record

0
·4 views

An audit trail for AI-assisted changes should identify the actor, the inputs, and the approver, but chat transcripts usually omit model version, inputs, and approval details. The article proposes the W3C PROV-DM vocabulary, which links activities, entities, and responsible agents to reconstruct how a change was produced. It argues provenance should be append-only, written by a separate service rather than the assistant itself, and should persist beyond model changes. Each change should carry a stable identifier, with the writer handling deduplication and blocking merges if the record cannot be stored, while unknown model versions are logged as unknown rather than dropped. The author recommends testing whether a merged change can be reconstructed from its record alone, starting with the approval identifier.

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 ·

Reducing Redundant Client Data Fetches With Ownership, Deduplication, and Freshness Windows

A common source of performance problems is the client, where screens, focus changes, rerenders, and global events repeatedly trigger requests for unchanged data. These redundant calls add server load, mobile data and battery costs, rate-limit pressure, and visual instability. The article recommends assigning each resource a single refresh owner, deduplicating concurrent requests by resource key with a single-flight pattern, and defining a bounded freshness window. It also advises keeping the last successful value when a refresh fails and ensuring store updates cannot retrigger their own synchronization. Using translation loading as an example, it argues that reference data and configuration should only sync during explicit lifecycle events rather than every time a user revisits a screen.

0
ProgrammingDEV Community ·

Company site drops its server: static pages served from a CDN replace WordPress

A company website that once ran on a rented WordPress server now has no server, serving 166 pages in nine languages from Cloudflare's network. A typical WordPress setup runs PHP and a database for every visitor, which requires constant updates and exposes it to security risks and downtime during traffic spikes. Static sites are pre-built into HTML files and delivered from nearby data centres, offering faster loading, fewer attack surfaces, and lower costs for typical company sites. Forms and similar features can run as small edge functions, while content editing can use a headless CMS. The article notes WordPress remains the better choice for sites needing complex plugins or frequent non-technical publishing.

0
ProgrammingDEV Community ·

Why 'Works on My Machine' Happens and How Developers Can Fix It

Code that passes on a developer's laptop often fails in CI or production because the local machine holds hidden state the servers lack. Common culprits include unpinned dependency and runtime versions, gitignored environment variables, case-insensitive file paths on macOS, local timezones, and stale caches or globally installed tools. The article recommends committing lockfiles, pinning Node versions, keeping a committed .env.example with startup validation, matching file casing, storing dates in UTC, and testing under throttled networks. Its central advice is to make environments explicit and reproducible, for example through clean CI builds or Docker.

0
ProgrammingDEV Community ·

Reducing Query Count Makes APIs Faster Than Bigger Database Servers

A common cause of slow APIs is serialization silently triggering extra database queries for related data, known as the N+1 problem. Such issues often go unnoticed in development but become costly with production volumes, concurrent requests, and remote databases. The recommended fix is to map each response field to its data source, using select_related for single relationships and prefetch_related for collections. List endpoints should stay compact, with detailed data reserved for detail endpoints, and repeated counts moved into annotations or aggregate queries. Pagination should occur at the database level, with indexes supporting real filter and ordering patterns, and query counts should be measured and guarded by regression tests.