By H. Omer Aktas
Editor, AIUpdateWatch.com
Published July 27, 2026 · Approximately 20 minutes
A small change with a long weekend
The Friday fix that worked perfectly—until Monday
A small business has an online appointment form. On Friday afternoon, someone asks an AI assistant to stop customers from booking dates in the past. The tool produces six neat lines of JavaScript. The form blocks yesterday’s date. The change is approved and published.
On Monday morning, bookings from another time zone start failing. The code compares the customer’s local date with the server’s date, but nobody asked what should happen near midnight. A valid booking can appear to be “in the past” depending on where the customer is.
The AI did not produce nonsense. It solved the narrow version of the problem it was given. The failure came from a missing rule that mattered in the real system.
Reject any appointment date earlier than today.
Apply the property’s booking time zone, handle midnight correctly and preserve existing rescheduling rules.
This is the central lesson of AI-assisted programming. The tool can write code quickly, but it cannot automatically know every business rule, security boundary, historical decision and strange exception that lives around that code.
Reliable software is not only syntax. It is an agreement between the code and the world in which the code must operate.
What an AI coding assistant actually does
At the simplest level, a coding assistant predicts useful code from the information it has been given. That information may include your written request, the current file, nearby files, repository instructions, error messages, tests and tool output.
Depending on the product and permissions, the assistant may do more than fill in a line. It may:
Suggest
Complete or rewrite code
It can finish a function, convert one style into another, explain unfamiliar code or propose a simpler structure.
Navigate
Read across a repository
It can search for related files, trace a function call or locate where a setting is defined.
Act
Edit several files
Agent-style tools can change code, update tests, run commands and prepare a pull request.
Inspect
Review and test
It can look for bugs, suggest test cases, run available checks and explain failures.
The important phrase is the information it has been given. A model may be excellent at Python and still misunderstand your application because it has not seen the database constraint, the deployment environment or the decision recorded in a meeting six months ago.
A coding assistant does not inherit the full mental model of the team. It builds a temporary model from the context it can access.
Why incorrect code can look completely professional
Bad human code often looks bad. Names are confusing, formatting is inconsistent and the writer appears uncertain. AI-generated code may have none of those warning signs.
It can be tidy, commented and confidently structured while still being wrong.
Surface quality
- clean formatting;
- sensible variable names;
- familiar design patterns;
- helpful-looking comments;
- a plausible explanation.
Actual correctness
- the right business rule;
- correct behavior at boundaries;
- safe handling of untrusted input;
- compatibility with the real environment;
- proof through tests and review.
These two columns overlap, but they are not the same. Readability makes code easier to inspect. It does not prove that the code does the right thing.
The original HumanEval research on code-generating language models measured functional correctness by running tests, not by asking whether a solution looked convincing. That distinction remains essential. Code is unusually testable compared with ordinary prose, and we should use that advantage.
A code block that has not been executed is still a claim about what it will do.
The most common failure is not ignorance. It is missing context.
Developers sometimes describe an AI mistake as hallucination. That can be accurate, especially when the tool invents an API, package or configuration option. But many failures are more ordinary: the assistant receives an incomplete picture and fills the gaps with a reasonable guess.
Imagine asking for a password-reset endpoint. The assistant may need to know:
If none of this is stated, the tool may create a technically plausible endpoint that violates the project’s actual security model.
Repository-wide agents can reduce this problem by reading more files and running tools. They do not eliminate it. Some requirements are not stored in code. Others are stored in old documents, operational knowledge or people’s heads.
The safer question is not “Does the AI know how to build password reset?” It is “Has the AI been given enough of our password-reset requirements to propose a change we can evaluate?”
Tests turn a confident answer into something you can challenge
Testing is not a ceremony added after coding. It is how a team makes expectations executable.
For the appointment-date example, one test that checks “yesterday is rejected” is not enough. A useful test set would include:
Yesterday is rejected and tomorrow is accepted.
Today remains valid at 11:59 p.m. in the booking time zone.
A customer abroad receives the same rule as a customer at the property.
Malformed dates fail safely and produce a useful message.
Rescheduling and recurring bookings still behave as before.
The behavior matches both local development and production settings.
AI is often good at generating candidate tests. That is valuable, but the same missing context can affect the tests. A tool may write tests that merely confirm its own mistaken interpretation.
The person reviewing the change should ask a simple question: Which real-world failure would this test catch?
Tests are strongest when they come from requirements, past incidents and known risks—not only from the implementation that happens to exist.
The dependency trap: a one-line import can carry a large decision
Generated code frequently solves a problem by adding a library. That can be sensible. It can also introduce more risk than the original feature.
Before accepting a suggested package, check:
- Does the package actually exist under that exact name?
- Is it the official package or a look-alike?
- Is it actively maintained?
- Does the version support your runtime?
- What license applies?
- Does it add transitive dependencies?
- Has it had recent security advisories?
- Could the same result be achieved safely with existing project code?
GitHub’s own guidance for reviewing AI-generated code warns reviewers to verify suggested dependencies and watch for packages that do not exist or have suspicious names.
A generated import statement is not a neutral convenience. It changes what your software trusts, downloads, updates and may eventually expose to users.
Security is not something you ask for after the code works
A common workflow is:
- Ask the AI to build the feature.
- Confirm that the happy path works.
- Later, ask whether there are security problems.
That order is backwards for features involving authentication, payments, file uploads, personal data, permissions or external commands.
Security decisions shape the design. They affect which data is accepted, where it is stored, who can act, what is logged and how failures are contained.
What can an attacker control?
Forms, URLs, uploaded files, API fields, headers, prompts and database values may all be untrusted.
What is the code allowed to do?
Database writes, file access, network calls and command execution should be limited to what the feature needs.
What happens when something goes wrong?
Errors should not expose secrets, corrupt state or leave a half-completed transaction.
Can the team understand the incident?
Useful logs and audit records must exist without recording passwords, tokens or unnecessary personal data.
NIST’s Secure Software Development Framework treats security practices as part of the development lifecycle rather than a final scan. The same principle applies when the first draft comes from an AI tool.
Modern coding agents can help find vulnerabilities and propose patches, but even security-focused systems are designed around validation and human review. A suggested patch remains a change to be examined, tested and approved.
Better coding requests describe the environment, not only the feature
“Build a login page” leaves almost every important decision open. A stronger request defines the boundaries of the work.
Weak request
Build a secure login page with remember me.
Stronger request
In this existing Astro application, add a login form that uses the current server-side session helper. Do not add packages. Preserve the existing rate limiter and CSRF protection. “Remember me” may extend the session to 14 days but must not change password-reset behavior. First identify the relevant files and propose a test plan. Do not edit anything until you have listed the assumptions that need confirmation.
The stronger version provides:
- the framework and project context;
- existing components that must be reused;
- explicit prohibitions;
- a business rule;
- a request for assumptions;
- and a staged workflow.
Useful coding prompts often follow this order:
This may feel slower than asking for the final code immediately. In practice, it reduces rework because misunderstandings are exposed before they spread across several files.
A practical review ladder for AI-generated code
Not every change needs the same level of scrutiny. Renaming a local variable is different from changing payment authorization. The review should match the consequence.
Read it
Understand every changed line. Reject code that nobody on the team can explain.
Run the local checks
Compile, lint, type-check and execute the relevant test suite.
Challenge the edges
Try empty values, limits, wrong permissions, unusual time zones, interrupted requests and repeated actions.
Inspect the wider diff
Look for deleted tests, loosened validation, new dependencies, changed configuration and unrelated edits.
Use independent review
For sensitive work, involve another person, automated security tools and a controlled environment.
Observe after release
Monitor errors, performance and real behavior. A passing test suite cannot predict every production condition.
OpenAI’s guidance for coding agents emphasizes that users should inspect the work through diffs, logs and test results, then manually review and validate generated code before integration and execution. GitHub similarly advises functional checks, context review, dependency scrutiny and collaborative review.
Can someone who does not code build an application with AI?
Yes—up to a point that depends on the application.
A non-developer can now create prototypes, personal tools, simple websites, small automations and internal forms that previously required much more technical help. That is a genuine expansion of access.
The difficulty arrives when the application must survive real users, private data, payments, legal obligations, integrations and future maintenance.
Lower-risk zone
Good place to learn and experiment
- personal calculators;
- static information sites;
- throwaway prototypes;
- local data transformations;
- small tools with no sensitive information.
Higher-risk zone
Professional review becomes important
- authentication and account recovery;
- payments and financial calculations;
- medical, legal or employment decisions;
- personal or confidential records;
- public services people will depend on.
The issue is not that non-coders are forbidden from building. It is that every builder needs a way to recognize when the project has crossed beyond their ability to verify it.
AI lowers the cost of producing code. It does not automatically lower the consequence of a mistake.
Where AI coding tools are most useful today
The strongest uses are often not “build the whole product for me.” They are smaller tasks where the result can be checked quickly.
Explaining unfamiliar code
Ask for a map of the files, data flow and important assumptions before making changes.
Drafting repetitive work
Generate boilerplate, serializers, form fields or test scaffolding, then review the project-specific details.
Finding likely causes
Provide the error, relevant code and recent changes; use the response to guide investigation rather than replace it.
Expanding test coverage
Ask which edge cases are missing and why each proposed test matters.
Reviewing a focused diff
Use the tool as an additional reviewer for logic, readability, security and unintended scope changes.
Learning by comparison
Request two implementations with trade-offs instead of accepting the first answer as the only design.
The common feature is fast feedback. The task is bounded, the output can be inspected and mistakes are less likely to hide inside a large autonomous change.
The rule worth keeping
Do not ask whether the AI wrote the code. Ask how the code was proved.
Authorship does not determine reliability. Human-written code can be unsafe. AI-generated code can be excellent. The difference comes from requirements, review, testing, security controls and operational evidence.
Speed is the benefit. Verification is the job.
Use AI to shorten the distance between an idea and a testable proposal. Do not let it shorten the distance between an untested proposal and production.
Sources and further reading
- Google Trends: artificial intelligence search trends and leading “best AI for…” searches
- GitHub Docs: Review AI-generated code
- OpenAI: Introducing Codex and the role of logs, tests and human validation
- NIST SP 800-218: Secure Software Development Framework
- Chen and colleagues: Evaluating Large Language Models Trained on Code