RSSAmplifier

Blog

Home on Codewrecks

Recent content in Home on Codewrecks

codewrecks.comRSS feed ↗200 posts

Latest posts

GitHub as a Primitive Control Plane for Spec-Driven Agents

This is an experiment. The code in azdo-cli is a personal sandbox, not a production-ready tool. The skills described here work well enough to demonstrate the idea, but they have known gaps: no real concurrency handling, limited error recovery, no support for multi-maintainer workflows, and prompt-level guards that a sufficiently adversarial input could bypass. I am sharing it because the pattern…

AI Browser Agents and Security: Isolation Levels to Protect Your Digital Life

AI browser agents are becoming increasingly powerful. Tools like Anthropic’s Claude, OpenAI’s Operator , and similar products can navigate the web on your behalf , clicking buttons, filling forms, and interacting with services. This is incredibly useful, but it introduces a security problem that many people overlook. If the AI controls a browser where you are logged into all your…

Why VS Code for C# Developers

If you’re a C# developer who has relied on a full Visual Studio IDE for years, Visual Studio Code (VS Code) might look like too small a tool for serious work. In reality with big solutions you will find full Visual Studio more productive but Visual Studio Code now has some specific features that makes it more useful especially for small project. C# Developer Toolkit For productive C#…

GitHub Copilot Plan-Then-Execute: Leveraging Background Agents and Git Worktrees

GitHub Copilot: Plan Then Execute in Background with Git Worktree GitHub Copilot’s recent evolution has introduced a revolutionary capability that fundamentally changes how developers can delegate work to AI: the ability to plan first and then execute in background using git worktrees . This feature represents a real evolution of your everyday worfklow with AI coding assistants. The Problem…

First experiments with Claude Code - Writing specs

When vibe coding, detailed specifications are highly advisable. The more freedom given to the model, the more the result can deviate from your needs. Using a model to help write detailed specifications is an easy way to accomplish this. This allows you to quickly generate good, detailed specs that you can manually refine. I often use various models with Open Web UI for this. Now that Claude Code…

Call o3-pro in Azure OpenAI using C# SDK

Azure OpenAI supports now o3-pro model. This model is different from other ones, here is a brief summary of its advantages: The o3-pro model excels at advanced reasoning, delivers high accuracy, supports long-context tasks, and integrates powerful tools like web search and code execution. It’s cost-effective, reliable, and ideal for complex workflows in research, business, and creative fields. You…

Pin GitHub action SHA to avoid security risk

The problem When you author GitHub action pipelines, you usually use third party actions, that can be easily referenced in your workflow with simple syntax. Usually you refer to a github action in your workflow with the following syntax 1 2 3 4 5 - name : Setup Hugo uses : peaceiris/actions-hugo@v2 with : hugo-version : '0.128.0' extended : true This is the standard way to use a third party action…

SonarCloud analysis in GitHub Actions

Running Sonar Cloud analysis on your open source project is usually a good thing, it is free, it gives you tons of useful information and you can automate everything for free with GitHub Actions . I’ve dealt with this ckind of functinoality before in my blog, today I want just to show how to create a GH action that works in linux, because usually if you take the original action from…

Understanding Azure DevOps Pipeline Statistics

Pipeline statistics in Azure DevOps provide a wealth of information that can help you understand the performance and efficiency of your pipelines . Even with really basic informations you can have interesting information. Lets examine Figure 1 : Pipeline statistics dashboard in Azure DevOps My favorite information (1) is the 80th percentile of pipeline duration, this indicates me if for some…

Pill: Problems in Azure DevOps Pipelines due to Shallow Fetch

In Azure DevOps, pipelines are a fundamental component for automating the build and release process. One of the key optimizations in these pipelines is the use of shallow fetch when cloning repositories . Unlike a full clone, which downloads the entire history of the repository, a shallow fetch retrieves only the specific commit needed for the build . This is a really welcomed feature, because…

Azure DevOps Pills: Hide not used features from Team Projects

Azure DevOps is a really complete set of functionalities to manage your Development Team and more. As you can see from Figure 1, it has five main Macro Set of Features that you can use. All these features are visible in the five icons in the lower right part of the card of each Team Project Figure 1: AzDo five main features blocks The very same five macro Feature set is visible on the left menu…

Azure DevOps Pills: Differences between old and new release pipeline

Happy New Year to everyone. Today I’ll deal with a common question I got from customer regarding Azure DevOps release pipeline. The problem arise because we already had a GUI based pipeline in the past and then we had a fully YAML pipeline so people are somewhat puzzled on which one to use in their scenario. When you have two way to do the same thing you are often confused on which tool to…

Azure DevOps Pills: Cleanup on premise pipeline agents

Managing pipeline/build agents is something that you should avoid if possible, preferring docker based agents or Microsoft hosted agents . Sometimes this is not a viable options, especially if you have lots of integration tests, that runs on mongodb/elasticsearch/etc etc. While it is quite simple to create a pipeline that uses docker to run these prerequisites speed is sometimes a problem that…

Pills: Accessing your Git Repositories in Azure DevOps in Linux

When you need to access your Git Repositories hosted on Azure DevOps in Linux, you have basically two distinct options. The first one is the classic ssh protocol, that is well know to everyone working with linux systems . Figure 1 : Choosing SSH as protocol to clone from Azure DevOps This is the preferred way to access from linux system but sadly, Azure DevOps still not support Hardware Key based…

Using Castle Windsor in .NET 8

Microsoft introduced Dependency Injection in the base framework with .NET Core, but until then, with the classic framework, we used external libraries, I’ve used Castle Windsor for years without any problem, but when .NET 8 was out, we start having tons of problems. The main problem is that with .NET 8 Microsoft introduced a concrete and working implementation of Named Dependencies , you can…

Pill: Unable to change Work Item type in Azure DevOps

Today I got a strange error in Azure DevOps, I create a new Product Backlog Item, while I was writing it I realized that it would be better to create a Bug Type. My natural reaction was, save and then use the Change Type command, but I got this error. Figure 1 : Error Changing a Work Item Type Work item type(s) cannot be moved because it is disabled, hidden or not supported.

Pills: Connect Azdo to external software

In our team, everything regarding developing is kept in Azure DevOps, but other informations are stored inside a custom software, so we often have the need to jump between a system and the other one . The actual connection is, one element in our software is bound to one or more Work Items in Azure DevOps. Desired result is: Ability to easily create a connection between the two, reduce the need to…

Azure DevOps: Cleanup Docker images for your Pull Requests

This article is a prosecution of the previous one on creating Docker Images for your Pull Requests and deals with cleanup of your Docker Registry. Authentication to Azure In Azure DevOps you can use connected services to connect to Azure Accounts or external services, but since I’m using mainly PowerShell scripts inside my repository, I often prefer using a Service Principal . This is a good…

Azure DevOps: Create Docker images for a Pull Request

The whole Pull Request process mechanism has a single purpose, have a better quality of the code that reach develop or generally speaking main branch . The ability to share the code and being able to get feedback from other members of the team is invaluable, but it is enough? The basic concept is: develop is a branch that should be considered production and it is not uncommon for teams to deploy…

GitHub Copilot Workspace: first impression

I have the luck to have enabled the technical preview of Github Copilot Workspace . As every good developer, I immediately jump at it, without reading anything (spoiler you have a good user manual ) that can be used to move your first steps into this marvelous world . Not reading the documentation is for me a good way to start using it and verify how intuitive is the tool and what it can do into a…

Azure DevOps: Package source mapping in pipeline

If you use more than one Nuget Feed in your solution and especially if you are using central package versioning, you probably got a warning telling you to use Package Source Mapping . The process is straightforward, it consist in modifying your nuget.config file to specify for each package the source feed where nuget can find the package . Here is an example for a solution I’m working: 1 2 3…

GitHub action with ElasticSearch integration tests and SonarCloud

I blogged in the past on how you can Analyze you code with SonarCloud in a GitHub action . Things changed a little in the latest year but in this post I want to examine a different aspect running tests that rely on external service, like ElasticSearch . Running integration test in GH action is a little more complex than running unit tests, because you need to setup the environment but thanks to…

Pill: Create an environment in an AzDo pipeline

Scenario: We have to create a new environment for a new customer, and an environment consists of some resources on Azure, plus an environment in azure DevOps to use with deploy pipeline . Since we are deploying with Azure DevOps pipeline, it makes sense to create everything for new customer environment with another pipeline. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27…

Pills: Enhancing Azure DevOps WorkItems with Hyperlinking to External Documentation

A frequently overlooked feature that can significantly enhance functionality in Azure DevOps is the ability to attach links to a WorkItem . A common question among users is: “Can I manage documentation in tools like SharePoint and then easily link it to my project in Azure DevOps?” This query arises because there’s often a limitation on how much text can be written directly into…

Pills: What to do when dotnet restore failed with 401 against an internal feed

This is an argument I’ve already discussed in the past in A post about nuget authentication . From a couple of days, in a project I’m working into the service started to return 401 even with the technique described in the aforementioned post. The sympthom is this error in the script that executed dotnet restore command. Unable to load the service index for source…

Azure Devops Api - Update list of allowed values for Custom Fields

The ability to customize process of Azure DevOps is one of the most powerful feature of the platform. Usually you add custom fields to work items to allow tracking information related to your own process and for your organization. One of the most common question I got usually is: How can I create a field that allows for a series of values that is taken from a database of mine?

Pills: Exploring Agent Options in Azure DevOps Pipelines: Managed vs. Self-Hosted

When configuring Azure DevOps pipelines, developers have a choice to make regarding the execution environment for their pipelines: they can either leverage Microsoft-managed agents provided in Azure or opt to self-host agents on their own infrastructure , whether that be on-premises virtual machines or cloud-based instances. One of the first question that arise is: which I need to use for my…

Pills: Do not miss repository policies in Azure DevOps

If you use Azure DevOps, it’s worth checking in repository settings page all the settings related to the policies of the repository itself . This is because often this type of setting is completely ignored, and you lose the opportunity to have very important controls on the repository itself. As you can see in Figure 1, there are many interesting policies that can help your team to keep a…

Pill: Include files in your publish profile for C# projects

When publishing an ASP.NET core web project, it’s often necessary to include certain files external to the Visual Studio solution but that are logical part of the project . A typical example is frontend build from angular projects. For web projects, it’s also common to include some static resources that might be outside of the web project, like images or files. At this point, we want…

Pill: Enhancing DevOps with Automated Pull Requests

Pull requests are a cornerstone of collaborative software development, particularly with distributed version control systems like Git and platforms such as GitHub or Azure DevOps. However, managing pull requests can become cumbersome, particularly for branches undergoing extensive modifications and receiving frequent feedback. This complexity is evident when preparing a pull request only to find…

Resolving .NET8 SDK Resolver Failure in Azure DevOps Pipelines

I encountered a problem with a simple pipeline designed for building a .NET Core project, which I had recently updated to .NET8. After updating the pipeline file to use the new version of the SDK, I faced an unexpected issue: all builds started failing with this error . ##[error]src\Intranet\Jarvis.Common.Shared\Jarvis.Common.Shared.csproj(0,0): Error MSB4242: SDK Resolver Failure: 'The SDK…

GitHub Secrets Scanning and Push Prevention

The risk of inadvertently including secrets in your Git repository has significantly increased in recent years. GitGuardian , a company providing solutions to prevent secret leakage in repositories, reports astonishing numbers regarding the quantity of secrets leaked in Git repositories. State of Secrets Sprawl Report 2023 Figure 1: More than 10 million secrets leaked, and the number raises every…

Allow easy source debugging for Nuget Packages and GitHub

In my previous blog posts, I’ve extensively discussed how to publish symbol libraries for .NET in Azure DevOps / Team Foundation Server . Azure DevOps has supported symbol server functionalities for a considerable time, making it straightforward to add steps in your build process for indexing your source code. This capability enables you to publish your .NET libraries to either an internal…

Always use rebase when you pull in Git

I have always suggested people to only use rebates when you pull changes from the branch you are working on in git. And this because, actually, using merge will make your repository history a mess. For a lot of years, this kind of suggestion was not so common. I’ve always looked at the teams happily used merge and then complain about how difficult is to read the story of the repository. At a…

Streamlining Cloud Deployment: Azure DevOps and AWS Integration Strategies

Let’s assume we need to deploy in a cloud environment and prefer not to install an agent on each physical environment . For example, managing numerous agents across multiple virtual machines becomes cumbersome from an Azure DevOps standpoint. While we can surely create an environment for each distinct installation, usually this create some burden administrating the agents. In such a…

Running GitVersion in Azure DevOps pipeline with dontet tool

For me, running GitVersion as part of a Pipeline is a golden standard. I barely remember a pipeline that does not use GitVersion as first task. The reason is simple, it allows me, at least, to give a better naming to build names. Instead of having meaningless date base number I have a semantic build that immediately gives me the idea of what was built . At least GitVersion can give a better name…

Introductory video playlist about Semantic Kernel RC

Semantic Kernel reached Release Candidate and there are some breaking changes from the latest beta. For this reason I re-recorded a series of video I’ve planned a couple of week ago with all examples updated to RC3. Here is the list on my youtube channel: Semantic Kernel Playlist Call python function from C# - How you can call python code from C# to simplify interaction with LLM or other…

Azure DevOps: Checkout specific branch to avoid gitversion errors in pipeline

If you create a new Azure DevOps Pipeline and include running GitVersion, sometimes you may encounter an error like the following: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 INFO [11/15/23 19:00:57:95] Begin: Calculating base versions INFO [11/15/23 19:00:57:96] Begin: Attempting to inherit branch configuration from parent branch INFO [11/15/23 19:00:57:97] End: Attempting to…

Azure DevOps: Script Caching in Azure DevOps

I’m authoring a release pipeline in Azure DevOps on an AWS ARM linux machine, I’ve installed the agent and created the script. The pipeline uses artifacts produced by another build pipeline and depends on a git repository that contains script . Here is how resources are declared in the pipeline. 1 2 3 4 5 6 7 8 9 10 11 12 resources : pipelines : - pipeline : UniqueHost source :…

Pills: Install release agent in ARM machines

With Azure Devops Environments you can register Virtual Machines with a dedicated agent that is capable of releasing your software. The procedure is simple, just create an environment, and a VM resource, and you are greeted with a minimal UI that let you choose configuration . Figure 1 : Configuring an agent for Azure DevOps environment As you can see it just require you to select the operating…

Pills: Identify nuget packages with vulnerabilities

Managing references is easy with Nuget, however, from a security standpoint, it’s not straightforward to ensure your project’s security by upgrading vulnerable references . GitHub Dependabot does an excellent job flagging vulnerable references, and the entire GitHub ecosystem has a strong emphasis on security. This empowers developers to handle security in the packages they produce.…

Debugging Production Issues with Dump Files and Visual Studio

Sometimes, you may encounter a problem in a production environment, such as a service that suddenly starts consuming a significant amount of RAM and CPU. In the past, I’ve seen people attempt to install Visual Studio on a production server to debug the issue directly, instead of relying on logs or other techniques. However, there’s a better approach: creating a dump file of the…

Azure DevOps: delete all unstable version of packages in feeds

Azure DevOps has a dedicated section for artifacts that allows you to store NuGet, NPM feeds, and more. Thanks to its integration with pipelines, very often, automatic pipelines are generated that publish packages with every commit in the repository . This way, we have the opportunity to have all versions for all dev branches. This approach is needed because the usual flow when you develop a new…

Modifying Azure DevOps Pipeline Decorators with Bing Chatbot Assistance

In the past, I’ve discussed using pipeline decorators to clean up build folders. Recently, I faced a challenge where I needed to modify my decorator to run only if there was a .git folder . To save time, I used Bing Chatbot, which leverages GPT powerful LLM and can search the internet to find latest contents, making this kind of problem-solving a breeze.

Remove submodule completely from your git repository

I have a project that uses git submodules in the past then they are removed long time ago, no-one had problem but I’ve noticed that Visual Studio had some strange warning during the build. 1 warning : Could not find a part of the path 'C:\develop\xxx\submodules\jarvis.catalog\.git' . The source code won ' t be available via Source Link. It seems that Visual Studio Integration with Git still…

Azure Pipelines starts failing indexing symbols

A build in Azure Devops recently started to fail during the index symbol task. The error wasn’t immediately clear. The error messages are really not informative, One such message was, “Request ed7b95f6b6f439e769a3e85422b7172be872403388fae1974fb4233dfd13da66 is sealed. Only expirationDate may be modified.” Honestly, this error didn’t tell me much. My general advice when…

Resolving Credential Conflicts in Git

Have you ever found yourself being asked to select a GitHub account every time you make a push ? This is often due to multiple access tokens being stored in your Windows credential manager. The Git Credential Manager can become confused when it doesn’t know which account to use. It’s only option in these situations is to ask you which of the stored credentials it should utilize.

Using GitHub Command Line Tool to View Pull Request Info

For people like me who prefer using Git in the command line, there are times when I need to retrieve information about pull requests or other GitHub related tasks. For example, suppose I need to share a link to a pull request that is under review with one of my colleagues for them to comment on . Sure, I could navigate to the GitHub website, locate the repository, navigate to the pull request page…

Pills: Azure Devops auto agents update

The ability to update Azure DevOps pipelines is a compelling feature, especially if you manage numerous on-premise agents. This feature eliminates maintenance issues by allowing all agents to be upgraded with just a single click . Figure 1 : One click update button I have an agent that runs only when needed, and it’s slightly outdated. By simply clicking a button, I can prompt the server to…

GitHub Copilot-X in action: Steps instructions in a single prompt

If you look at previous post on the subject I’m experimenting with Copilot Chat to have it automate mundane, repetitive operation but that can operate on complex classes. In previous example I demonstrated how you can decompose a complex operation in multiple steps, actually guiding Copilot towards desired result. Now the question is: Once you got it right, is it possible to use a single…