<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NAJIB OLADOSU</title>
    <description>The latest articles on DEV Community by NAJIB OLADOSU (@najiboladosu).</description>
    <link>https://dev.to/najiboladosu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4255856%2Fe8a8384b-d120-4ceb-8fca-0aa686e06250.png</url>
      <title>DEV Community: NAJIB OLADOSU</title>
      <link>https://dev.to/najiboladosu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/najiboladosu"/>
    <language>en</language>
    <item>
      <title>How ApplyOS keeps AI feedback tied to the right resume version</title>
      <dc:creator>NAJIB OLADOSU</dc:creator>
      <pubDate>Fri, 20 Nov 2026 14:11:13 +0000</pubDate>
      <link>https://dev.to/najiboladosu/how-applyos-keeps-ai-feedback-tied-to-the-right-resume-version-93f</link>
      <guid>https://dev.to/najiboladosu/how-applyos-keeps-ai-feedback-tied-to-the-right-resume-version-93f</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv4tf7aufimjgfw2x2dy7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv4tf7aufimjgfw2x2dy7.jpg" alt="ApplyOS project cover" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Originally published on the ApplyOS blog by Najib Oladosu, a software engineer based in Nigeria.&lt;/p&gt;

&lt;p&gt;An AI response can read well and still be attached to the wrong input.&lt;/p&gt;

&lt;p&gt;Imagine uploading a resume, checking it against a job description, then saving an edited version. When you return to the feedback screen, which version does that feedback describe?&lt;/p&gt;

&lt;p&gt;That question shaped how I built Job Fit in &lt;a href="https://www.applyos.io/" rel="noopener noreferrer"&gt;ApplyOS&lt;/a&gt;. The feature compares a saved resume with an application's job description. To make the feedback useful, I need to keep the result connected to the exact resume that went into the request.&lt;/p&gt;

&lt;p&gt;This article walks through the current implementation in Next.js, TypeScript and Supabase PostgreSQL. The screenshots use demonstration records. Their scores are examples, not hiring predictions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdw0m7a10axtqrjromt5b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdw0m7a10axtqrjromt5b.jpg" alt="ApplyOS Job Fit screen with a selected resume version and example feedback" width="799" height="694"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with three records
&lt;/h2&gt;

&lt;p&gt;I separate the uploaded document, a saved resume version and the analysis result.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;document&lt;/strong&gt; holds the source upload and its extracted or parsed content.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;resume version&lt;/strong&gt; identifies a saved snapshot associated with that document.&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;analysis&lt;/strong&gt; connects an application to the version it evaluated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That gives the result a clear identity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application + saved resume version -&amp;gt; Job Fit result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A document ID alone isn't enough. Two edited resumes can come from the same upload while saying different things. An application ID alone isn't enough either, because one application can be evaluated against several saved resumes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep saved content stable
&lt;/h2&gt;

&lt;p&gt;The upload becomes the original version. Edited copies are new rows in &lt;code&gt;resume_versions&lt;/code&gt;, rather than updates to the original content.&lt;/p&gt;

&lt;p&gt;The database backs up that rule. A trigger rejects changes to snapshot fields such as the saved editor content, source document and version number. Some metadata can still change, such as whether an edited version is starred. Deleting a document also has its own lifecycle; "immutable snapshot" doesn't mean the record exists forever.&lt;/p&gt;

&lt;p&gt;Version numbering happens in PostgreSQL too. The insertion trigger takes a transaction-level advisory lock for the document before choosing its next number. This serializes number allocation for simultaneous saves of that document. A unique constraint on document ID and version number is an additional check.&lt;/p&gt;

&lt;p&gt;I put these rules in the database because uploads and saves can come from more than one interface. Each client shouldn't have to invent its own versioning rules.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbjgz7lz5f1ktywkggel8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbjgz7lz5f1ktywkggel8.jpg" alt="ApplyOS version selector showing saved resume copies using demonstration data" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Carry the chosen version through the request
&lt;/h2&gt;

&lt;p&gt;The Job Fit interface sends all three identifiers. This is the request shape used in the component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;applicationId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;application&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;documentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;selectedDocumentId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;resumeVersionId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;selectedVersionId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server checks authentication, reads the application and document, and checks that they belong to the current user. It then looks up the requested version within that document and checks its owner too.&lt;/p&gt;

&lt;p&gt;The text sent to the model comes from that version's saved editor content. If the version uses the older block format, the route converts those blocks instead. Only the original version can fall back to the source document's parsed or extracted text.&lt;/p&gt;

&lt;p&gt;That last boundary matters. Falling back to the upload for an empty edited version would evaluate different content from the content the person selected. The route returns an error for an unreadable edited version instead.&lt;/p&gt;

&lt;p&gt;Older callers that omit the version ID deliberately use the original upload. That compatibility choice is explicit in the route.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use the same identity when saving the result
&lt;/h2&gt;

&lt;p&gt;The analysis table has a unique constraint on &lt;code&gt;(application_id, resume_version_id)&lt;/code&gt;. The route uses that pair when it writes the pending state, stores a successful result or records a failed model call.&lt;/p&gt;

&lt;p&gt;Here is a shortened excerpt of the successful write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upsert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;analysisIdentity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;analysis_result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;analysis&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;analysis_status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'success'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;summary_generated_at&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;completedAt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;updated_at&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;completedAt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;onConflict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'application_id,resume_version_id'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The identity object also includes the document ID. Database access policies check that the application and resume version belong to the signed-in user and that the version belongs to the named document.&lt;/p&gt;

&lt;p&gt;This design stores one current result for each application and saved-version pair. Running it again updates that result. It isn't a history of every model response.&lt;/p&gt;

&lt;p&gt;The API also distinguishes a model result from a saved result: if analysis finishes but persistence fails, it returns a save error. A successful model call alone doesn't mean the work is safely stored.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the connection visible
&lt;/h2&gt;

&lt;p&gt;The interface lets the person choose the document and saved version. Within an application's Job Fit view, successful results are cached by version ID. Selecting a version chooses its matching result; a newly saved version doesn't automatically inherit the previous version's cached feedback.&lt;/p&gt;

&lt;p&gt;The important interaction is simple: choose the resume you mean, inspect its feedback, edit it, then run Job Fit on the new saved version when you're ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the checks prove, and what they don't
&lt;/h2&gt;

&lt;p&gt;The repository has unit checks for converting saved editor content into readable text, including block boundaries, invalid input and the older block format. Those checks help verify the text-building step. They don't prove the accuracy of the model's advice or every browser and database interaction.&lt;/p&gt;

&lt;p&gt;For changes to this workflow, the regression cases I want to exercise include switching between two saved versions, rejecting a version from another document, rejecting another user's resources, and preserving the correct identity when a model call or save fails.&lt;/p&gt;

&lt;p&gt;There are further boundaries to make explicit. The analysis key doesn't include a snapshot of the job description. If that description changes, the application ID still refers to the same application. A job-description revision and a record of the model and prompt used would give the result a more complete account of its inputs. I also want to test what happens when the selected version changes while a request is still running.&lt;/p&gt;

&lt;p&gt;These are separate questions from resume versioning. Naming them keeps the engineering claim honest.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lesson I take into other AI features
&lt;/h2&gt;

&lt;p&gt;Before improving a prompt, I ask whether the application can explain the input behind its answer.&lt;/p&gt;

&lt;p&gt;Which record was read? Which saved version? Who owns it? Was the result stored successfully? What should happen if the input changes?&lt;/p&gt;

&lt;p&gt;Those questions apply to document summaries, recommendations and other AI-assisted workflows. Clear data relationships give the person a better chance of understanding what the software actually evaluated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read the implementation
&lt;/h2&gt;

&lt;p&gt;These links point to the source revision used for this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/NajibOladosu/ApplyOS/blob/899897d3b28457302931a65b2155878d80f3187d/app/api/applications/analyze/route.ts" rel="noopener noreferrer"&gt;Job Fit API route&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/NajibOladosu/ApplyOS/blob/899897d3b28457302931a65b2155878d80f3187d/supabase/migrations/034_unify_job_fit_resume_versions.sql" rel="noopener noreferrer"&gt;Resume-version migration and database rules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/NajibOladosu/ApplyOS/blob/899897d3b28457302931a65b2155878d80f3187d/modules/applications/components/job-fit-tab.tsx" rel="noopener noreferrer"&gt;Job Fit interface&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/NajibOladosu/ApplyOS/blob/899897d3b28457302931a65b2155878d80f3187d/tests/unit/lib/editor-plain-text.test.ts" rel="noopener noreferrer"&gt;Plain-text conversion tests&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm &lt;strong&gt;Najib Oladosu&lt;/strong&gt;, a Nigeria-based backend-first, full-stack software engineer working with Python, TypeScript, APIs and AI integrations. I'm available for remote engineering roles and scoped product work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://najibaio.vercel.app/" rel="noopener noreferrer"&gt;Explore my portfolio&lt;/a&gt; · &lt;a href="https://github.com/NajibOladosu" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;a href="https://www.linkedin.com/in/najibaio/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>postgres</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
